mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-25 17:00:05 +08:00
RocksDb using aggr property metrics for pendingCompactionBytes.
This commit is contained in:
parent
29cf5f1fbf
commit
6543bce8ae
@ -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