[Groonga-commit] groonga/groonga at 438b5fa [master] Flush chunk

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Jun 26 13:04:46 JST 2015


Kouhei Sutou	2015-06-26 13:04:46 +0900 (Fri, 26 Jun 2015)

  New Revision: 438b5fa13bee713e27ed8d006ded8a871d7545b6
  https://github.com/groonga/groonga/commit/438b5fa13bee713e27ed8d006ded8a871d7545b6

  Message:
    Flush chunk

  Modified files:
    lib/db.c
    lib/grn_ii.h
    lib/ii.c

  Modified: lib/db.c (+3 -0)
===================================================================
--- lib/db.c    2015-06-26 12:31:53 +0900 (7bc41a9)
+++ lib/db.c    2015-06-26 13:04:46 +0900 (e213812)
@@ -9752,6 +9752,9 @@ grn_obj_flush(grn_ctx *ctx, grn_obj *obj)
   case GRN_TABLE_DAT_KEY :
     rc = grn_dat_flush(ctx, (grn_dat *)obj);
     break;
+  case GRN_COLUMN_INDEX :
+    rc = grn_ii_flush(ctx, (grn_ii *)obj);
+    break;
   default :
     rc = grn_io_flush(ctx, grn_obj_io(obj));
     break;

  Modified: lib/grn_ii.h (+1 -0)
===================================================================
--- lib/grn_ii.h    2015-06-26 12:31:53 +0900 (6356af5)
+++ lib/grn_ii.h    2015-06-26 13:04:46 +0900 (1ac9528)
@@ -105,6 +105,7 @@ grn_rc grn_ii_updspec_add(grn_ctx *ctx, grn_ii_updspec *u, int pos, int32_t weig
 int grn_ii_updspec_cmp(grn_ii_updspec *a, grn_ii_updspec *b);
 
 void grn_ii_expire(grn_ctx *ctx, grn_ii *ii);
+grn_rc grn_ii_flush(grn_ctx *ctx, grn_ii *ii);
 
 typedef struct {
   grn_id rid;

  Modified: lib/ii.c (+13 -0)
===================================================================
--- lib/ii.c    2015-06-26 12:31:53 +0900 (2e0c92c)
+++ lib/ii.c    2015-06-26 13:04:46 +0900 (53018fe)
@@ -3718,6 +3718,19 @@ grn_ii_expire(grn_ctx *ctx, grn_ii *ii)
   grn_io_expire(ctx, ii->chunk, 0, 1000000);
 }
 
+grn_rc
+grn_ii_flush(grn_ctx *ctx, grn_ii *ii)
+{
+  grn_rc rc;
+
+  rc = grn_io_flush(ctx, ii->seg);
+  if (rc == GRN_SUCCESS) {
+    rc = grn_io_flush(ctx, ii->chunk);
+  }
+
+  return rc;
+}
+
 #define BIT11_01(x) ((x >> 1) & 0x7ff)
 #define BIT31_12(x) (x >> 12)
 
-------------- next part --------------
HTML����������������������������...
Download 



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