[Groonga-commit] groonga/groonga [master] Fixed cursor leak on suggest learner.

Back to archive index

null+****@clear***** null+****@clear*****
2011年 1月 6日 (木) 15:50:00 JST


Tasuku SUENAGA a.k.a. gunyarakun	2011-01-06 06:50:00 +0000 (Thu, 06 Jan 2011)

  New Revision: 29eabea296e9ae36759a6067f423943dd005ace6

  Log:
    Fixed cursor leak on suggest learner.

  Modified files:
    src/suggest/groonga_suggest_learner.c

  Modified: src/suggest/groonga_suggest_learner.c (+3 -2)
===================================================================
--- src/suggest/groonga_suggest_learner.c    2011-01-06 06:36:00 +0000 (aa293cb)
+++ src/suggest/groonga_suggest_learner.c    2011-01-06 06:50:00 +0000 (8fe464d)
@@ -310,6 +310,7 @@ send_handler(void *zmq_send_sock, grn_ctx *ctx)
         }
       }
     }
+    grn_table_cursor_close(ctx, cur);
   }
 }
 
@@ -324,9 +325,9 @@ send_to_httpd(void *arg)
       if (!(grn_ctx_init(&ctx, 0))) {
         grn_obj *db;
         if ((db = grn_db_open(&ctx, thd->db_path))) {
+          uint64_t hwm = 1;
+          zmq_setsockopt(zmq_send_sock, ZMQ_HWM, &hwm, sizeof(uint64_t));
           while (loop) {
-            uint64_t hwm = 1;
-            zmq_setsockopt(zmq_send_sock, ZMQ_HWM, &hwm, sizeof(uint64_t));
             send_handler(zmq_send_sock, &ctx);
           }
           grn_obj_close(&ctx, db);




Groonga-commit メーリングリストの案内
Back to archive index