mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-14 01:42:37 +08:00
Clean up TagThrottler* files
This commit is contained in:
parent
5799b6cbd7
commit
cc52a44df5
@ -137,19 +137,12 @@ class TagThrottlerImpl {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Optional<double> autoThrottleTag(TransactionTag tag, double busyness) {
|
||||
return throttledTags.autoThrottleTag(id, tag, busyness);
|
||||
}
|
||||
*/
|
||||
|
||||
Future<Void> tryUpdateAutoThrottling(TransactionTag tag, double rate, double busyness, TagThrottledReason reason) {
|
||||
// NOTE: before the comparison with MIN_TAG_COST, the busiest tag rate also compares with MIN_TAG_PAGES_RATE
|
||||
// currently MIN_TAG_PAGES_RATE > MIN_TAG_COST in our default knobs.
|
||||
if (busyness > SERVER_KNOBS->AUTO_THROTTLE_TARGET_TAG_BUSYNESS && rate > SERVER_KNOBS->MIN_TAG_COST) {
|
||||
TEST(true); // Transaction tag auto-throttled
|
||||
Optional<double> clientRate =
|
||||
throttledTags.autoThrottleTag(id, tag, busyness); // autoThrottleTag(tag, busyness);
|
||||
Optional<double> clientRate = throttledTags.autoThrottleTag(id, tag, busyness);
|
||||
if (clientRate.present()) {
|
||||
TagSet tags;
|
||||
tags.addTag(tag);
|
||||
|
@ -28,7 +28,7 @@ class TagThrottler {
|
||||
|
||||
public:
|
||||
TagThrottler(Database db, UID id);
|
||||
~ITagThrottler();
|
||||
~TagThrottler();
|
||||
|
||||
// Poll the system keyspace looking for updates made through the tag throttling API
|
||||
Future<Void> monitorThrottlingChanges();
|
||||
@ -36,7 +36,7 @@ public:
|
||||
// Increment the number of known requests associated with the specified tag
|
||||
void addRequests(TransactionTag tag, int count);
|
||||
|
||||
// This throttled tag change ID is used to coordinate updates with the
|
||||
// This throttled tag change ID is used to coordinate updates with the GRV proxies
|
||||
uint64_t getThrottledTagChangeId() const;
|
||||
|
||||
// For each tag and priority combination, return the throughput limit and expiration time
|
||||
@ -50,5 +50,5 @@ public:
|
||||
|
||||
// Based on the busiest read and write tags in the provided storage queue info, update
|
||||
// tag throttling limits.
|
||||
Future<Void> tryAutoThrottleTag(StorageQueueInfo&, int64_t storageQueue, int64_t storageDurabilityLag);
|
||||
Future<Void> tryUpdateAutoThrottling(StorageQueueInfo const&);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user