mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-14 09:58:50 +08:00
Merge pull request #6867 from neethuhaneesha/rocksdb-aggrProperty
RocksDb using aggr property metrics for pendingCompactionBytes.
This commit is contained in:
commit
5ffd9e0172
@ -1847,11 +1847,13 @@ struct RocksDBKeyValueStore : IKeyValueStore {
|
||||
ACTOR Future<Void> checkRocksdbState(RocksDBKeyValueStore* self) {
|
||||
state uint64_t estPendCompactBytes;
|
||||
state int count = SERVER_KNOBS->ROCKSDB_CAN_COMMIT_DELAY_TIMES_ON_OVERLOAD;
|
||||
self->db->GetIntProperty(rocksdb::DB::Properties::kEstimatePendingCompactionBytes, &estPendCompactBytes);
|
||||
self->db->GetAggregatedIntProperty(rocksdb::DB::Properties::kEstimatePendingCompactionBytes,
|
||||
&estPendCompactBytes);
|
||||
while (count && estPendCompactBytes > SERVER_KNOBS->ROCKSDB_CAN_COMMIT_COMPACT_BYTES_LIMIT) {
|
||||
wait(delay(SERVER_KNOBS->ROCKSDB_CAN_COMMIT_DELAY_ON_OVERLOAD));
|
||||
count--;
|
||||
self->db->GetIntProperty(rocksdb::DB::Properties::kEstimatePendingCompactionBytes, &estPendCompactBytes);
|
||||
self->db->GetAggregatedIntProperty(rocksdb::DB::Properties::kEstimatePendingCompactionBytes,
|
||||
&estPendCompactBytes);
|
||||
}
|
||||
|
||||
return Void();
|
||||
|
Loading…
x
Reference in New Issue
Block a user