[Groonga-commit] groonga/groonga at 3492575 [master] Lock detection support chunk of index column

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Nov 4 12:09:19 JST 2016


Kouhei Sutou	2016-11-04 12:09:19 +0900 (Fri, 04 Nov 2016)

  New Revision: 349257503de3be67133eb2ae3ac2312d3142318e
  https://github.com/groonga/groonga/commit/349257503de3be67133eb2ae3ac2312d3142318e

  Message:
    Lock detection support chunk of index column

  Modified files:
    lib/db.c

  Modified: lib/db.c (+8 -0)
===================================================================
--- lib/db.c    2016-11-04 11:56:56 +0900 (287241b)
+++ lib/db.c    2016-11-04 12:09:19 +0900 (f8ca3a2)
@@ -11250,8 +11250,13 @@ grn_obj_clear_lock(grn_ctx *ctx, grn_obj *obj)
     break;
   case GRN_COLUMN_FIX_SIZE:
   case GRN_COLUMN_VAR_SIZE:
+    grn_io_clear_lock(grn_obj_io(obj));
+    break;
   case GRN_COLUMN_INDEX:
     grn_io_clear_lock(grn_obj_io(obj));
+    if (obj) {
+      grn_io_clear_lock(((grn_ii *)obj)->chunk);
+    }
     break;
   }
   GRN_API_RETURN(GRN_SUCCESS);
@@ -11263,6 +11268,9 @@ grn_obj_is_locked(grn_ctx *ctx, grn_obj *obj)
   unsigned int res = 0;
   GRN_API_ENTER;
   res = grn_io_is_locked(grn_obj_io(obj));
+  if (obj && obj->header.type == GRN_COLUMN_INDEX) {
+    res += grn_io_is_locked(((grn_ii *)obj)->chunk);
+  }
   GRN_API_RETURN(res);
 }
 
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index