diff --git a/include/rocksdb/write_batch.h b/include/rocksdb/write_batch.h index 51fd4d8ac..dfadeca8a 100644 --- a/include/rocksdb/write_batch.h +++ b/include/rocksdb/write_batch.h @@ -173,6 +173,10 @@ class WriteBatch : public WriteBatchBase { // Otherwise returns Status::OK(). Status PopSavePoint() override; + void setContentFlag(uint32_t theContentFlag) { + content_flags_.store(theContentFlag,std::memory_order_seq_cst); + } + // Support for iterating over the contents of a batch. class Handler { public: diff --git a/include/rocksdb/write_buffer_manager.h b/include/rocksdb/write_buffer_manager.h index ae1c98caf..22b69abb9 100644 --- a/include/rocksdb/write_buffer_manager.h +++ b/include/rocksdb/write_buffer_manager.h @@ -87,8 +87,12 @@ class WriteBufferManager { } } + void SetBufferSize(size_t new_size) { + buffer_size_ = new_size; + } + private: - const size_t buffer_size_; + std::atomic buffer_size_; const size_t mutable_limit_; std::atomic memory_used_; // Memory that hasn't been scheduled to free.