Skip to content

Commit

Permalink
Stardog Patches: WriteBatch + WriteBufferManager
Browse files Browse the repository at this point in the history
  • Loading branch information
graetzer committed Feb 4, 2021
1 parent fbed72f commit a2b2f7e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions include/rocksdb/write_batch.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 5 additions & 1 deletion include/rocksdb/write_buffer_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,12 @@ class WriteBufferManager {
}
}

void SetBufferSize(size_t new_size) {
buffer_size_ = new_size;
}

private:
const size_t buffer_size_;
std::atomic<size_t> buffer_size_;
const size_t mutable_limit_;
std::atomic<size_t> memory_used_;
// Memory that hasn't been scheduled to free.
Expand Down

0 comments on commit a2b2f7e

Please sign in to comment.