[Groonga-commit] groonga/grnxx [master] Change the timing of unfreezing frozen pages.

Back to archive index

susumu.yata null+****@clear*****
Wed Dec 5 13:07:09 JST 2012


susumu.yata	2012-12-05 13:07:09 +0900 (Wed, 05 Dec 2012)

  New Revision: 1cb2d9ec3734ead2144dba4391bd55fe497cdfe9
  https://github.com/groonga/grnxx/commit/1cb2d9ec3734ead2144dba4391bd55fe497cdfe9

  Log:
    Change the timing of unfreezing frozen pages.

  Modified files:
    lib/alpha/blob_vector.cpp

  Modified: lib/alpha/blob_vector.cpp (+3 -3)
===================================================================
--- lib/alpha/blob_vector.cpp    2012-12-05 11:46:48 +0900 (dcce9b2)
+++ lib/alpha/blob_vector.cpp    2012-12-05 13:07:09 +0900 (44fa76d)
@@ -318,6 +318,9 @@ BlobVectorMediumValue BlobVectorImpl::create_medium_value(
 
   // TODO: Lock.
 
+  // Unfreeze the oldest frozen page for reuse.
+  unfreeze_oldest_frozen_page();
+
   capacity = (capacity + (BLOB_VECTOR_UNIT_SIZE - 1)) &
       ~(BLOB_VECTOR_UNIT_SIZE - 1);
 
@@ -340,9 +343,6 @@ BlobVectorMediumValue BlobVectorImpl::create_medium_value(
       }
     }
 
-    // Unfreeze the oldest frozen page for reuse.
-    unfreeze_oldest_frozen_page();
-
     const uint32_t page_id = header_->next_page_id();
     offset = static_cast<uint64_t>(
         page_id << BLOB_VECTOR_VALUE_STORE_PAGE_SIZE_BITS);
-------------- next part --------------
HTML����������������������������...
Download 



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