prevent the proxy from delaying too long based on an incorrect estimate of the compute time
This commit is contained in:
parent
71782ff803
commit
6e7d2ff7dd
|
@ -756,7 +756,7 @@ public:
|
|||
|
||||
// timer() can be up to one second ahead of now()
|
||||
virtual double timer() {
|
||||
timerTime += deterministicRandom()->random01()*(time+1.0-timerTime)/2.0;
|
||||
timerTime += deterministicRandom()->random01()*(time+0.1-timerTime)/2.0;
|
||||
return timerTime;
|
||||
}
|
||||
|
||||
|
|
|
@ -318,6 +318,7 @@ ServerKnobs::ServerKnobs(bool randomize, ClientKnobs* clientKnobs, bool isSimula
|
|||
init( ALWAYS_CAUSAL_READ_RISKY, false );
|
||||
init( MAX_COMMIT_UPDATES, 2000 ); if( randomize && BUGGIFY ) MAX_COMMIT_UPDATES = 1;
|
||||
init( MIN_PROXY_COMPUTE, 0.001 );
|
||||
init( MAX_PROXY_COMPUTE, 2.0 );
|
||||
init( PROXY_COMPUTE_BUCKETS, 20000 );
|
||||
init( PROXY_COMPUTE_GROWTH_RATE, 0.01 );
|
||||
|
||||
|
|
|
@ -264,6 +264,7 @@ public:
|
|||
bool ALWAYS_CAUSAL_READ_RISKY;
|
||||
int MAX_COMMIT_UPDATES;
|
||||
double MIN_PROXY_COMPUTE;
|
||||
double MAX_PROXY_COMPUTE;
|
||||
int PROXY_COMPUTE_BUCKETS;
|
||||
double PROXY_COMPUTE_GROWTH_RATE;
|
||||
|
||||
|
|
|
@ -534,7 +534,7 @@ ACTOR Future<Void> commitBatch(
|
|||
/////// Phase 1: Pre-resolution processing (CPU bound except waiting for a version # which is separately pipelined and *should* be available by now (unless empty commit); ordered; currently atomic but could yield)
|
||||
TEST(self->latestLocalCommitBatchResolving.get() < localBatchNumber-1); // Queuing pre-resolution commit processing
|
||||
wait(self->latestLocalCommitBatchResolving.whenAtLeast(localBatchNumber-1));
|
||||
state Future<Void> releaseDelay = delay(batchOperations*self->commitComputePerOperation[latencyBucket], TaskPriority::ProxyMasterVersionReply);
|
||||
state Future<Void> releaseDelay = delay(std::min(SERVER_KNOBS->MAX_PROXY_COMPUTE, batchOperations*self->commitComputePerOperation[latencyBucket]), TaskPriority::ProxyMasterVersionReply);
|
||||
|
||||
if (debugID.present())
|
||||
g_traceBatch.addEvent("CommitDebug", debugID.get().first(), "MasterProxyServer.commitBatch.GettingCommitVersion");
|
||||
|
|
Loading…
Reference in New Issue