From 6ec9299f491df923d36296d33df55354873ff2f5 Mon Sep 17 00:00:00 2001 From: Yupeng Date: Fri, 4 Jan 2019 17:00:46 +0800 Subject: [PATCH] Fix compile error --- libmmux/src/mmux/directory/fs/directory_tree.h | 4 ++-- libmmux/src/mmux/storage/kv/kv_block.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libmmux/src/mmux/directory/fs/directory_tree.h b/libmmux/src/mmux/directory/fs/directory_tree.h index 6ba523bf9..67e5f63cb 100644 --- a/libmmux/src/mmux/directory/fs/directory_tree.h +++ b/libmmux/src/mmux/directory/fs/directory_tree.h @@ -591,7 +591,7 @@ class ds_file_node : public ds_node { slot_end, chain_status::stable, storage_mode::in_memory); - assert(to_chain.block_names.size() == chain_length); + assert(to_chain.block_names.size() == dstatus_.chain_length()); // Set old chain to exporting and new chain to importing if (dstatus_.chain_length() == 1) { @@ -677,7 +677,7 @@ class ds_file_node : public ds_node { slot_end, chain_status::stable, storage_mode::in_memory); - assert(to_chain.block_names.size() == chain_length); + assert(to_chain.block_names.size() == dstatus_.chain_length()); // Set old chain to exporting and new chain to importing if (dstatus_.chain_length() == 1) { diff --git a/libmmux/src/mmux/storage/kv/kv_block.cpp b/libmmux/src/mmux/storage/kv/kv_block.cpp index 65154bfdd..57ef980f0 100644 --- a/libmmux/src/mmux/storage/kv/kv_block.cpp +++ b/libmmux/src/mmux/storage/kv/kv_block.cpp @@ -475,7 +475,7 @@ void kv_block::run_command(std::vector &_return, int32_t oid, const } void kv_block::reset() { - std::unique_lock lock(metadata_mtx_); + std::unique_lock lock(metadata_mtx_); block_.clear(); next_->reset("nil"); path_ = ""; @@ -526,7 +526,7 @@ bool kv_block::sync(const std::string &path) { } bool kv_block::dump(const std::string &path) { - std::unique_lock lock(metadata_mtx_); + std::unique_lock lock(metadata_mtx_); bool expected = true; bool flushed = false; if (dirty_.compare_exchange_strong(expected, false)) {