[Groonga-commit] groonga/grnxx at bd3ff0c [master] Allow to create a node as a child of an unlinked node.

Back to archive index

susumu.yata null+****@clear*****
Thu May 30 14:46:07 JST 2013


susumu.yata	2013-05-30 14:46:07 +0900 (Thu, 30 May 2013)

  New Revision: bd3ff0c3dfaf61a482aaa080205d4962a8fae376
  https://github.com/groonga/grnxx/commit/bd3ff0c3dfaf61a482aaa080205d4962a8fae376

  Message:
    Allow to create a node as a child of an unlinked node.

  Modified files:
    lib/grnxx/storage/storage_impl.cpp

  Modified: lib/grnxx/storage/storage_impl.cpp (+2 -2)
===================================================================
--- lib/grnxx/storage/storage_impl.cpp    2013-05-30 14:42:42 +0900 (a469493)
+++ lib/grnxx/storage/storage_impl.cpp    2013-05-30 14:46:07 +0900 (4eb2b3a)
@@ -200,8 +200,8 @@ StorageNode StorageImpl::create_node(uint32_t parent_node_id, uint64_t size) {
   if (!parent_node_header) {
     return StorageNode(nullptr);
   }
-  if (parent_node_header->status != STORAGE_NODE_ACTIVE) {
-    // TODO: How about an unlinked node?
+  if ((parent_node_header->status != STORAGE_NODE_ACTIVE) &&
+      (parent_node_header->status != STORAGE_NODE_UNLINKED)) {
     GRNXX_WARNING() << "invalid argument: status = "
                     << parent_node_header->status;
     return StorageNode(nullptr);
-------------- next part --------------
HTML����������������������������...
下载 



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