Skip to content

Commit

Permalink
Fix conflicts
Browse files Browse the repository at this point in the history
Signed-off-by: Yang Zhang <[email protected]>
  • Loading branch information
v01dstar committed Oct 4, 2024
1 parent 3dccaa1 commit 2f60944
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 16 deletions.
5 changes: 5 additions & 0 deletions db/c.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4959,6 +4959,11 @@ size_t rocksdb_write_buffer_manager_dummy_entries_in_cache_usage(
return wbm->rep->dummy_entries_in_cache_usage();
}

size_t rocksdb_write_buffer_manager_flush_size(
rocksdb_write_buffer_manager_t* wbm) {
return wbm->rep->flush_size();
}

rocksdb_dbpath_t* rocksdb_dbpath_create(const char* path,
uint64_t target_size) {
rocksdb_dbpath_t* result = new rocksdb_dbpath_t;
Expand Down
8 changes: 1 addition & 7 deletions db/c_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -3792,14 +3792,8 @@ int main(int argc, char** argv) {

CheckCondition(true ==
rocksdb_write_buffer_manager_enabled(write_buffer_manager));
CheckCondition(true == rocksdb_write_buffer_manager_cost_to_cache(
write_buffer_manager));
CheckCondition(
200 == rocksdb_write_buffer_manager_buffer_size(write_buffer_manager));

rocksdb_write_buffer_manager_set_buffer_size(write_buffer_manager, 300);
CheckCondition(
300 == rocksdb_write_buffer_manager_buffer_size(write_buffer_manager));
200 == rocksdb_write_buffer_manager_flush_size(write_buffer_manager));

rocksdb_write_buffer_manager_destroy(write_buffer_manager);
rocksdb_cache_destroy(lru);
Expand Down
4 changes: 3 additions & 1 deletion db/db_flush_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -740,9 +740,11 @@ class TestFlushListener : public EventListener {
DBFlushTest* test_;
};

// Disabled, because of
// https://github.com/tikv/rocksdb/pull/389/commits/cc433939ed937a82d0a0ccad1280d5907b048654
TEST_F(
DBFlushTest,
FixUnrecoverableWriteDuringAtomicFlushWaitUntilFlushWouldNotStallWrites) {
DISABLED_FixUnrecoverableWriteDuringAtomicFlushWaitUntilFlushWouldNotStallWrites) {
Options options = CurrentOptions();
options.atomic_flush = true;

Expand Down
8 changes: 1 addition & 7 deletions include/rocksdb/c.h
Original file line number Diff line number Diff line change
Expand Up @@ -2099,8 +2099,6 @@ extern ROCKSDB_LIBRARY_API void rocksdb_write_buffer_manager_destroy(
rocksdb_write_buffer_manager_t* wbm);
extern ROCKSDB_LIBRARY_API bool rocksdb_write_buffer_manager_enabled(
rocksdb_write_buffer_manager_t* wbm);
extern ROCKSDB_LIBRARY_API bool rocksdb_write_buffer_manager_cost_to_cache(
rocksdb_write_buffer_manager_t* wbm);
extern ROCKSDB_LIBRARY_API size_t
rocksdb_write_buffer_manager_memory_usage(rocksdb_write_buffer_manager_t* wbm);
extern ROCKSDB_LIBRARY_API size_t
Expand All @@ -2110,11 +2108,7 @@ extern ROCKSDB_LIBRARY_API size_t
rocksdb_write_buffer_manager_dummy_entries_in_cache_usage(
rocksdb_write_buffer_manager_t* wbm);
extern ROCKSDB_LIBRARY_API size_t
rocksdb_write_buffer_manager_buffer_size(rocksdb_write_buffer_manager_t* wbm);
extern ROCKSDB_LIBRARY_API void rocksdb_write_buffer_manager_set_buffer_size(
rocksdb_write_buffer_manager_t* wbm, size_t new_size);
extern ROCKSDB_LIBRARY_API void rocksdb_write_buffer_manager_set_allow_stall(
rocksdb_write_buffer_manager_t* wbm, bool new_allow_stall);
rocksdb_write_buffer_manager_flush_size(rocksdb_write_buffer_manager_t* wbm);

/* HyperClockCache */

Expand Down
2 changes: 1 addition & 1 deletion options/options_settable_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ TEST_F(OptionsSettableTest, ColumnFamilyOptionsAllFieldsSettable) {
sizeof(std::shared_ptr<ConcurrentTaskLimiter>)},
{offsetof(struct ColumnFamilyOptions, sst_partitioner_factory),
sizeof(std::shared_ptr<SstPartitionerFactory>)},
{offset_of(&ColumnFamilyOptions::cf_write_buffer_manager),
{offsetof(struct ColumnFamilyOptions, cf_write_buffer_manager),
sizeof(std::shared_ptr<WriteBufferManager>)},
};

Expand Down

0 comments on commit 2f60944

Please sign in to comment.