Rename TagQueue::runEpoch to TagQueue::releaseTransactions

This commit is contained in:
sfc-gh-tclinkenbeard 2022-10-07 08:17:55 -07:00
parent f74b724c03
commit bbf69b2d0a
3 changed files with 8 additions and 8 deletions

View File

@ -888,7 +888,7 @@ ACTOR static Future<Void> transactionStarter(GrvProxyInterface proxy,
elapsed = 1e-15;
}
tagQueue.runEpoch(elapsed, defaultQueue, batchQueue);
tagQueue.releaseTransactions(elapsed, defaultQueue, batchQueue);
normalRateInfo.startReleaseWindow();
batchRateInfo.startReleaseWindow();

View File

@ -40,9 +40,9 @@ void TagQueue::addRequest(GetReadVersionRequest req) {
newRequests.push_back(req);
}
void TagQueue::runEpoch(double elapsed,
SpannedDeque<GetReadVersionRequest>& outBatchPriority,
SpannedDeque<GetReadVersionRequest>& outDefaultPriority) {
void TagQueue::releaseTransactions(double elapsed,
SpannedDeque<GetReadVersionRequest>& outBatchPriority,
SpannedDeque<GetReadVersionRequest>& outDefaultPriority) {
for (auto& [_, rateInfo] : rateInfos) {
rateInfo.startReleaseWindow();
}
@ -128,7 +128,7 @@ ACTOR static Future<Void> mockServer(TagQueue* tagQueue) {
loop {
state double elapsed = (0.009 + 0.002 * deterministicRandom()->random01());
wait(delay(elapsed));
tagQueue->runEpoch(elapsed, outBatchPriority, outDefaultPriority);
tagQueue->releaseTransactions(elapsed, outBatchPriority, outDefaultPriority);
while (!outBatchPriority.empty()) {
outBatchPriority.front().reply.send(GetReadVersionReply{});
outBatchPriority.pop_front();

View File

@ -44,9 +44,9 @@ public:
// elapsed indicates the amount of time since the last epoch was run.
// If a request is ready to be executed, it is sent to the deque
// corresponding to its priority. If not, the request remains queued.
void runEpoch(double elapsed,
SpannedDeque<GetReadVersionRequest>& outBatchPriority,
SpannedDeque<GetReadVersionRequest>& outDefaultPriority);
void releaseTransactions(double elapsed,
SpannedDeque<GetReadVersionRequest>& outBatchPriority,
SpannedDeque<GetReadVersionRequest>& outDefaultPriority);
void addRequest(GetReadVersionRequest);
};