MCPcopy Create free account
hub / github.com/apple/foundationdb / rkThrottlingCooledDown

Function rkThrottlingCooledDown

fdbclient/NativeAPI.actor.cpp:6960–6975  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6958}
6959
6960bool rkThrottlingCooledDown(DatabaseContext* cx, TransactionPriority priority) {
6961 if (priority == TransactionPriority::IMMEDIATE) {
6962 return true;
6963 } else if (priority == TransactionPriority::BATCH) {
6964 if (cx->lastRkBatchThrottleTime == 0.0) {
6965 return true;
6966 }
6967 return (now() - cx->lastRkBatchThrottleTime > CLIENT_KNOBS->GRV_CACHE_RK_COOLDOWN);
6968 } else if (priority == TransactionPriority::DEFAULT) {
6969 if (cx->lastRkDefaultThrottleTime == 0.0) {
6970 return true;
6971 }
6972 return (now() - cx->lastRkDefaultThrottleTime > CLIENT_KNOBS->GRV_CACHE_RK_COOLDOWN);
6973 }
6974 return false;
6975}
6976
6977Future<Version> Transaction::getReadVersion(uint32_t flags) {
6978 if (!readVersion.isValid()) {

Callers 1

getReadVersionMethod · 0.85

Calls 1

nowFunction · 0.85

Tested by

no test coverage detected