Navigation Menu

Skip to content

Commit

Permalink
Fix a bug of grnxx::map::HashTable.
Browse files Browse the repository at this point in the history
grnxx::map::hash_table::KeyIDArray could not be unlinked.
  • Loading branch information
s-yata committed Jun 21, 2013
1 parent e983146 commit f3c93e5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/grnxx/map/hash_table/key_id_array.hpp
Expand Up @@ -113,7 +113,11 @@ class KeyIDArray {

// Unlink an array.
static bool unlink(Storage *storage, uint32_t storage_node_id) {
return ArrayImpl::unlink(storage, storage_node_id);
std::unique_ptr<KeyIDArray> array(open(storage, storage_node_id));
if (!array) {
return false;
}
return storage->unlink_node(storage_node_id);
}

// Return the number of values in each page.
Expand Down

0 comments on commit f3c93e5

Please sign in to comment.