[Groonga-commit] groonga/groonga at a50389f [master] io_flush: fix a bug that DB is always unflushed

Back to archive index
Kouhei Sutou null+****@clear*****
Wed Dec 5 13:42:37 JST 2018


Kouhei Sutou	2018-12-05 13:42:37 +0900 (Wed, 05 Dec 2018)

  Revision: a50389f2094ac1f2339ac0502e58f36c2e0a3f96
  https://github.com/groonga/groonga/commit/a50389f2094ac1f2339ac0502e58f36c2e0a3f96

  Message:
    io_flush: fix a bug that DB is always unflushed
    
    Because unlock against DB is always executed after flush.

  Modified files:
    lib/proc.c

  Modified: lib/proc.c (+7 -0)
===================================================================
--- lib/proc.c    2018-11-30 11:36:28 +0900 (5192fb9bc)
+++ lib/proc.c    2018-12-05 13:42:37 +0900 (9d3f31e47)
@@ -3781,6 +3781,13 @@ proc_io_flush(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *user_data)
       rc = unlock_rc;
     }
   }
+  {
+    grn_rc flush_rc;
+    flush_rc = grn_obj_flush(ctx, db);
+    if (rc == GRN_SUCCESS) {
+      rc = flush_rc;
+    }
+  }
   GRN_OUTPUT_BOOL(rc == GRN_SUCCESS);
 
   return NULL;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20181205/b4bc0f72/attachment.html>


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