Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions eloq_data_store_service/rocksdb_cloud_data_store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,11 @@ bool RocksDBCloudDataStore::OpenCloudDB(
max_bytes_for_level_multiplier_;
}

if (disable_write_stall_)
{
options.disable_write_stall = disable_write_stall_;
}

// Add event listener for purger
rocksdb::CloudFileSystemImpl *cfs_impl =
dynamic_cast<rocksdb::CloudFileSystemImpl *>(cloud_fs_.get());
Expand Down
10 changes: 10 additions & 0 deletions eloq_data_store_service/rocksdb_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ DEFINE_string(
rocksdb_batch_write_size,
"1MB", /*Adjust for balancing the memory footprint and throughput*/
"RocksDB batch write size when doing checkpoint");
DEFINE_bool(
rocksdb_disable_write_stall,
false,
"RocksDB disable write stall due to too many background operations");

DEFINE_uint32(
rocksdb_periodic_compaction_seconds,
Expand Down Expand Up @@ -489,6 +493,12 @@ RocksDBConfig::RocksDBConfig(const INIReader &config,
: config.GetString("store",
"rocksdb_dialy_offpeak_time_utc",
FLAGS_rocksdb_dialy_offpeak_time_utc);
disable_write_stall_ =
!CheckCommandLineFlagIsDefault("rocksdb_disable_write_stall")
? FLAGS_rocksdb_disable_write_stall
: config.GetBoolean("store",
"rocksdb_disable_write_stall",
FLAGS_rocksdb_disable_write_stall);
};

#if (defined(DATA_STORE_TYPE_ELOQDSS_ROCKSDB_CLOUD_S3) || \
Expand Down
1 change: 1 addition & 0 deletions eloq_data_store_service/rocksdb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ struct RocksDBConfig
size_t batch_write_size_;
size_t periodic_compaction_seconds_;
std::string dialy_offpeak_time_utc_;
bool disable_write_stall_;
};

#if (defined(DATA_STORE_TYPE_ELOQDSS_ROCKSDB_CLOUD_S3) || \
Expand Down
2 changes: 2 additions & 0 deletions eloq_data_store_service/rocksdb_data_store_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ class RocksDBDataStoreCommon : public DataStore
config.hard_pending_compaction_bytes_limit_bytes_),
max_subcompactions_(config.max_subcompactions_),
write_rate_limit_(config.write_rate_limit_bytes_),
disable_write_stall_(config.disable_write_stall_),
batch_write_size_(config.batch_write_size_),
periodic_compaction_seconds_(config.periodic_compaction_seconds_),
dialy_offpeak_time_utc_(config.dialy_offpeak_time_utc_),
Expand Down Expand Up @@ -307,6 +308,7 @@ class RocksDBDataStoreCommon : public DataStore
const size_t hard_pending_compaction_bytes_limit_;
const size_t max_subcompactions_;
const size_t write_rate_limit_;
const bool disable_write_stall_;
const size_t batch_write_size_;
const size_t periodic_compaction_seconds_;
const std::string dialy_offpeak_time_utc_;
Expand Down