[Groonga-commit] groonga/groonga at 2193540 [master] ii: initialize position for each merge

Back to archive index
Kouhei Sutou null+****@clear*****
Fri Feb 15 10:25:58 JST 2019


Kouhei Sutou	2019-02-15 10:25:58 +0900 (Fri, 15 Feb 2019)

  Revision: 219354009fe1cf283bd113ee0c70acb165b265d3
  https://github.com/groonga/groonga/commit/219354009fe1cf283bd113ee0c70acb165b265d3

  Message:
    ii: initialize position for each merge

  Modified files:
    lib/ii.c

  Modified: lib/ii.c (+2 -1)
===================================================================
--- lib/ii.c    2019-02-15 10:14:40 +0900 (586d65869)
+++ lib/ii.c    2019-02-15 10:25:58 +0900 (b719f3e7a)
@@ -3644,6 +3644,7 @@ chunk_merge(grn_ctx *ctx,
     GRN_OBJ_FIN(ctx, &term);
     goto exit;
   }
+  data->position = 0;
   do {
     if (!merger_merge(ctx, data)) {
       break;
@@ -3868,7 +3869,6 @@ buffer_merge(grn_ctx *ctx, grn_ii *ii, uint32_t seg, grn_hash *h,
       continue;
     }
 
-    data.position = 0;
     buffer_data->next_position = bt->pos_in_buffer;
     merger_get_next_buffer(ctx, &data);
     if (ctx->rc != GRN_SUCCESS) {
@@ -4036,6 +4036,7 @@ buffer_merge(grn_ctx *ctx, grn_ii *ii, uint32_t seg, grn_hash *h,
       if (cinfo) { GRN_FREE(cinfo); }
       goto exit;
     }
+    data.position = 0;
     while (merger_merge(ctx, &data)) {
     }
     if (ctx->rc != GRN_SUCCESS) {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20190215/2026cb97/attachment-0001.html>


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