From 2f609446808b3b1b090dacaa029839de8dca4a3c Mon Sep 17 00:00:00 2001 From: Yang Zhang Date: Thu, 3 Oct 2024 22:14:12 -0700 Subject: [PATCH] Fix conflicts Signed-off-by: Yang Zhang --- db/c.cc | 5 +++++ db/c_test.c | 8 +------- db/db_flush_test.cc | 4 +++- include/rocksdb/c.h | 8 +------- options/options_settable_test.cc | 2 +- 5 files changed, 11 insertions(+), 16 deletions(-) diff --git a/db/c.cc b/db/c.cc index 15afce89c8da..4ddb46760959 100644 --- a/db/c.cc +++ b/db/c.cc @@ -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; diff --git a/db/c_test.c b/db/c_test.c index 667220496920..b9bee287f0f5 100644 --- a/db/c_test.c +++ b/db/c_test.c @@ -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); diff --git a/db/db_flush_test.cc b/db/db_flush_test.cc index fe4ab07a8786..3b943cfd4fa3 100644 --- a/db/db_flush_test.cc +++ b/db/db_flush_test.cc @@ -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; diff --git a/include/rocksdb/c.h b/include/rocksdb/c.h index 8148a29673de..30a7dbec8ebe 100644 --- a/include/rocksdb/c.h +++ b/include/rocksdb/c.h @@ -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 @@ -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 */ diff --git a/options/options_settable_test.cc b/options/options_settable_test.cc index 17fcec521ccc..f8a45d1f4aa2 100644 --- a/options/options_settable_test.cc +++ b/options/options_settable_test.cc @@ -438,7 +438,7 @@ TEST_F(OptionsSettableTest, ColumnFamilyOptionsAllFieldsSettable) { sizeof(std::shared_ptr)}, {offsetof(struct ColumnFamilyOptions, sst_partitioner_factory), sizeof(std::shared_ptr)}, - {offset_of(&ColumnFamilyOptions::cf_write_buffer_manager), + {offsetof(struct ColumnFamilyOptions, cf_write_buffer_manager), sizeof(std::shared_ptr)}, };