[Groonga-commit] groonga/grnxx at 7459067 [master] Don't open a pool in Map::open().

Back to archive index

susumu.yata null+****@clear*****
Tue Aug 20 15:52:37 JST 2013


susumu.yata	2013-08-20 15:52:37 +0900 (Tue, 20 Aug 2013)

  New Revision: 74590674e120cfe61463e800e92aa58bbb80fc6d
  https://github.com/groonga/grnxx/commit/74590674e120cfe61463e800e92aa58bbb80fc6d

  Message:
    Don't open a pool in Map::open().

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

  Modified: lib/grnxx/map/array_map.cpp (+1 -3)
===================================================================
--- lib/grnxx/map/array_map.cpp    2013-08-20 15:52:07 +0900 (b1b0f9d)
+++ lib/grnxx/map/array_map.cpp    2013-08-20 15:52:37 +0900 (568daa6)
@@ -311,6 +311,7 @@ void ArrayMap<T>::create_map(Storage *storage, uint32_t storage_node_id,
     *header_ = Header();
     pool_.reset(Pool::create(storage, storage_node_id_));
     header_->pool_storage_node_id = pool_->storage_node_id();
+    pool_id_ = ++header_->pool_id;
   } catch (...) {
     storage->unlink_node(storage_node_id_);
     throw;
@@ -333,9 +334,6 @@ void ArrayMap<T>::open_map(Storage *storage, uint32_t storage_node_id) {
                   << ", actual = " << header_->common_header.format();
     throw LogicError();
   }
-  Lock lock(&header_->mutex);
-  pool_.reset(Pool::open(storage, header_->pool_storage_node_id));
-  pool_id_ = header_->pool_id;
 }
 
 template <typename T>
-------------- next part --------------
HTML����������������������������...
Download 



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