Rename transaction tag map.
This commit is contained in:
parent
2b66dcd24a
commit
6619a1a36a
|
@ -219,7 +219,7 @@ public:
|
|||
UID dbId;
|
||||
bool internal; // Only contexts created through the C client and fdbcli are non-internal
|
||||
|
||||
PrioritizedTagThrottleMap<ClientTagThrottleData> throttledTags;
|
||||
PrioritizedTransactionTagMap<ClientTagThrottleData> throttledTags;
|
||||
|
||||
CounterCollection cc;
|
||||
|
||||
|
|
|
@ -166,7 +166,7 @@ struct GetReadVersionReply {
|
|||
bool locked;
|
||||
Optional<Value> metadataVersion;
|
||||
|
||||
TagThrottleMap<ClientTagThrottleLimits> tagThrottleInfo;
|
||||
TransactionTagMap<ClientTagThrottleLimits> tagThrottleInfo;
|
||||
|
||||
GetReadVersionReply() : version(invalidVersion), locked(false) {}
|
||||
|
||||
|
|
|
@ -164,9 +164,9 @@ namespace ThrottleApi {
|
|||
BINARY_SERIALIZABLE(ThrottleApi::Priority);
|
||||
|
||||
template<class Value>
|
||||
using TagThrottleMap = std::unordered_map<TransactionTag, Value, std::hash<TransactionTagRef>>;
|
||||
using TransactionTagMap = std::unordered_map<TransactionTag, Value, std::hash<TransactionTagRef>>;
|
||||
|
||||
template<class Value>
|
||||
using PrioritizedTagThrottleMap = std::map<ThrottleApi::Priority, TagThrottleMap<Value>>;
|
||||
using PrioritizedTransactionTagMap = std::map<ThrottleApi::Priority, TransactionTagMap<Value>>;
|
||||
|
||||
#endif
|
|
@ -99,7 +99,7 @@ struct ProxyStats {
|
|||
|
||||
ACTOR Future<Void> getRate(UID myID, Reference<AsyncVar<ServerDBInfo>> db, int64_t* inTransactionCount, int64_t* inBatchTransactionCount, double* outTransactionRate,
|
||||
double* outBatchTransactionRate, GetHealthMetricsReply* healthMetricsReply, GetHealthMetricsReply* detailedHealthMetricsReply,
|
||||
TagThrottleMap<uint64_t>* transactionTagCounter, PrioritizedTagThrottleMap<ClientTagThrottleLimits>* throttledTags) {
|
||||
TransactionTagMap<uint64_t>* transactionTagCounter, PrioritizedTransactionTagMap<ClientTagThrottleLimits>* throttledTags) {
|
||||
state Future<Void> nextRequestTimer = Never();
|
||||
state Future<Void> leaseTimeout = Never();
|
||||
state Future<GetRateInfoReply> reply = Never();
|
||||
|
@ -187,8 +187,8 @@ ACTOR Future<Void> queueTransactionStartRequests(
|
|||
PromiseStream<Void> GRVTimer, double *lastGRVTime,
|
||||
double *GRVBatchTime, FutureStream<double> replyTimes,
|
||||
ProxyStats* stats, TransactionRateInfo* batchRateInfo,
|
||||
PrioritizedTagThrottleMap<ClientTagThrottleLimits>* throttledTags,
|
||||
TagThrottleMap<uint64_t>* transactionTagCounter)
|
||||
PrioritizedTransactionTagMap<ClientTagThrottleLimits>* throttledTags,
|
||||
TransactionTagMap<uint64_t>* transactionTagCounter)
|
||||
{
|
||||
loop choose{
|
||||
when(GetReadVersionRequest req = waitNext(readVersionRequests)) {
|
||||
|
@ -1305,7 +1305,7 @@ ACTOR Future<GetReadVersionReply> getLiveCommittedVersion(ProxyCommitData* commi
|
|||
}
|
||||
|
||||
ACTOR Future<Void> sendGrvReplies(Future<GetReadVersionReply> replyFuture, std::vector<GetReadVersionRequest> requests,
|
||||
ProxyStats* stats, Version minKnownCommittedVersion, PrioritizedTagThrottleMap<ClientTagThrottleLimits> throttledTags) {
|
||||
ProxyStats* stats, Version minKnownCommittedVersion, PrioritizedTransactionTagMap<ClientTagThrottleLimits> throttledTags) {
|
||||
GetReadVersionReply _baseReply = wait(replyFuture);
|
||||
GetReadVersionReply baseReply = _baseReply;
|
||||
double end = g_network->timer();
|
||||
|
@ -1366,8 +1366,8 @@ ACTOR static Future<Void> transactionStarter(
|
|||
state Deque<GetReadVersionRequest> batchQueue;
|
||||
state vector<MasterProxyInterface> otherProxies;
|
||||
|
||||
state TagThrottleMap<uint64_t> transactionTagCounter;
|
||||
state PrioritizedTagThrottleMap<ClientTagThrottleLimits> throttledTags;
|
||||
state TransactionTagMap<uint64_t> transactionTagCounter;
|
||||
state PrioritizedTransactionTagMap<ClientTagThrottleLimits> throttledTags;
|
||||
|
||||
state PromiseStream<double> replyTimes;
|
||||
addActor.send(getRate(proxy.id(), db, &transactionCount, &batchTransactionCount, &normalRateInfo.rate, &batchRateInfo.rate, healthMetricsReply, detailedHealthMetricsReply, &transactionTagCounter, &throttledTags));
|
||||
|
|
|
@ -238,7 +238,7 @@ struct RatekeeperData {
|
|||
double lastWarning;
|
||||
double lastSSListFetchedTimestamp;
|
||||
|
||||
PrioritizedTagThrottleMap<RkTagThrottleData> throttledTags;
|
||||
PrioritizedTransactionTagMap<RkTagThrottleData> throttledTags;
|
||||
|
||||
RatekeeperLimits normalLimits;
|
||||
RatekeeperLimits batchLimits;
|
||||
|
@ -458,7 +458,7 @@ ACTOR Future<Void> monitorThrottlingChanges(RatekeeperData *self) {
|
|||
self->autoThrottlingEnabled = SERVER_KNOBS->AUTO_TAG_THROTTLING_ENABLED;
|
||||
}
|
||||
|
||||
PrioritizedTagThrottleMap<RkTagThrottleData> updatedTagThrottles;
|
||||
PrioritizedTransactionTagMap<RkTagThrottleData> updatedTagThrottles;
|
||||
|
||||
TraceEvent("RatekeeperReadThrottles").detail("NumThrottledTags", throttledTags.get().size());
|
||||
for(auto entry : throttledTags.get()) {
|
||||
|
@ -524,7 +524,7 @@ ACTOR Future<Void> monitorThrottlingChanges(RatekeeperData *self) {
|
|||
}
|
||||
}
|
||||
|
||||
void updateRate(RatekeeperData* self, RatekeeperLimits* limits, TagThrottleMap<RkTagThrottleData>& throttledTags) {
|
||||
void updateRate(RatekeeperData* self, RatekeeperLimits* limits, TransactionTagMap<RkTagThrottleData>& throttledTags) {
|
||||
//double controlFactor = ; // dt / eFoldingTime
|
||||
|
||||
double actualTps = self->smoothReleasedTransactions.smoothRate();
|
||||
|
|
|
@ -72,7 +72,7 @@ struct GetRateInfoReply {
|
|||
double leaseDuration;
|
||||
HealthMetrics healthMetrics;
|
||||
|
||||
PrioritizedTagThrottleMap<ClientTagThrottleLimits> throttledTags;
|
||||
PrioritizedTransactionTagMap<ClientTagThrottleLimits> throttledTags;
|
||||
|
||||
template <class Ar>
|
||||
void serialize(Ar& ar) {
|
||||
|
@ -86,12 +86,12 @@ struct GetRateInfoRequest {
|
|||
int64_t totalReleasedTransactions;
|
||||
int64_t batchReleasedTransactions;
|
||||
|
||||
TagThrottleMap<uint64_t> throttledTagCounts;
|
||||
TransactionTagMap<uint64_t> throttledTagCounts;
|
||||
bool detailed;
|
||||
ReplyPromise<struct GetRateInfoReply> reply;
|
||||
|
||||
GetRateInfoRequest() {}
|
||||
GetRateInfoRequest(UID const& requesterID, int64_t totalReleasedTransactions, int64_t batchReleasedTransactions, TagThrottleMap<uint64_t> throttledTagCounts, bool detailed)
|
||||
GetRateInfoRequest(UID const& requesterID, int64_t totalReleasedTransactions, int64_t batchReleasedTransactions, TransactionTagMap<uint64_t> throttledTagCounts, bool detailed)
|
||||
: requesterID(requesterID), totalReleasedTransactions(totalReleasedTransactions), batchReleasedTransactions(batchReleasedTransactions), throttledTagCounts(throttledTagCounts), detailed(detailed) {}
|
||||
|
||||
template <class Ar>
|
||||
|
|
|
@ -460,7 +460,7 @@ public:
|
|||
: tag(tag), count(count), fractionalBusyness((double)count/totalCount), elapsed(elapsed) {}
|
||||
};
|
||||
|
||||
TagThrottleMap<int64_t> intervalCounts;
|
||||
TransactionTagMap<int64_t> intervalCounts;
|
||||
int64_t intervalTotalSampledCount = 0;
|
||||
TransactionTag busiestTag;
|
||||
int64_t busiestTagCount = 0;
|
||||
|
|
Loading…
Reference in New Issue