diff --git a/implementations/onblocks/datatreestore/DataTree.cpp b/implementations/onblocks/datatreestore/DataTree.cpp index f1734e8a..caa53131 100644 --- a/implementations/onblocks/datatreestore/DataTree.cpp +++ b/implementations/onblocks/datatreestore/DataTree.cpp @@ -115,7 +115,6 @@ void DataTree::traverseLeaves(uint32_t beginIndex, uint32_t endIndex, function(this)->traverseLeaves(beginIndex, endIndex, [func](const DataLeafNode* leaf, uint32_t leafIndex) { func(const_cast(leaf), leafIndex); }); - flush(); } void DataTree::traverseLeaves(uint32_t beginIndex, uint32_t endIndex, function func) const { @@ -196,7 +195,6 @@ void DataTree::resizeNumBytes(uint64_t newNumBytes) { } uint32_t newLastLeafSize = newNumBytes - (newNumLeaves-1)*_nodeStore->layout().maxBytesPerLeaf(); LastLeaf(_rootNode.get())->resize(newLastLeafSize); - flush(); } assert(newNumBytes == numStoredBytes()); } diff --git a/implementations/onblocks/datatreestore/DataTree.h b/implementations/onblocks/datatreestore/DataTree.h index af047e41..0d726e13 100644 --- a/implementations/onblocks/datatreestore/DataTree.h +++ b/implementations/onblocks/datatreestore/DataTree.h @@ -35,6 +35,8 @@ public: uint64_t numStoredBytes() const; + void flush() const; + private: mutable boost::shared_mutex _mutex; datanodestore::DataNodeStore *_nodeStore; @@ -61,8 +63,6 @@ private: cpputils::optional_ownership_ptr LastLeaf(datanodestore::DataNode *root); std::unique_ptr LastLeaf(std::unique_ptr root); - void flush() const; - DISALLOW_COPY_AND_ASSIGN(DataTree); };