[Groonga-commit] groonga/grnxx at 5650077 [master] Fix a bug that unlinks an already freed page.

Back to archive index

susumu.yata null+****@clear*****
Fri Aug 23 10:46:34 JST 2013


susumu.yata	2013-08-23 10:46:34 +0900 (Fri, 23 Aug 2013)

  New Revision: 56500777d2059b02f3d0aff4e68b4ee68824e768
  https://github.com/groonga/grnxx/commit/56500777d2059b02f3d0aff4e68b4ee68824e768

  Message:
    Fix a bug that unlinks an already freed page.

  Modified files:
    lib/grnxx/map/pool.cpp

  Modified: lib/grnxx/map/pool.cpp (+1 -1)
===================================================================
--- lib/grnxx/map/pool.cpp    2013-08-22 13:42:40 +0900 (d16b416)
+++ lib/grnxx/map/pool.cpp    2013-08-23 10:46:34 +0900 (fa0ae37)
@@ -685,7 +685,7 @@ uint64_t Pool<Bytes>::reserve_space(uint32_t size) {
   }
   const uint32_t page_id = static_cast<uint32_t>(offset / PAGE_SIZE);
   if (page_id > 0) {
-    if (table_[page_id - 1].size_in_use == 0) {
+    if ((table_[page_id - 1].size_in_use == 0) && (page_size_left != 0)) {
       // Unlink an empty page if it is fixed.
       storage_->unlink_node(table_[page_id - 1].page_storage_node_id);
     }
-------------- next part --------------
HTML����������������������������...
Download 



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