Skip to content

Commit

Permalink
Merge pull request #7 from charles-typ/fix_build_error
Browse files Browse the repository at this point in the history
Fix compile error
  • Loading branch information
Yupeng Tang authored Jan 20, 2019
2 parents 60df5a0 + 6ec9299 commit 31a3cf3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions libmmux/src/mmux/directory/fs/directory_tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,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) {
Expand Down Expand Up @@ -679,7 +679,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) {
Expand Down
4 changes: 2 additions & 2 deletions libmmux/src/mmux/storage/kv/kv_block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ void kv_block::run_command(std::vector<std::string> &_return, int32_t oid, const
}

void kv_block::reset() {
std::unique_lock lock(metadata_mtx_);
std::unique_lock<std::shared_mutex> lock(metadata_mtx_);
block_.clear();
next_->reset("nil");
path_ = "";
Expand Down Expand Up @@ -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<std::shared_mutex> lock(metadata_mtx_);
bool expected = true;
bool flushed = false;
if (dirty_.compare_exchange_strong(expected, false)) {
Expand Down

0 comments on commit 31a3cf3

Please sign in to comment.