fix: after a forced recovery it is possible to not have logs from all generations, so only wait at most a second for getting a popped txs version
This commit is contained in:
parent
b0480edd15
commit
9382a58390
|
@ -81,6 +81,7 @@ ServerKnobs::ServerKnobs(bool randomize, ClientKnobs* clientKnobs) {
|
|||
init( TLOG_DEGRADED_DELAY_COUNT, 5 );
|
||||
init( TLOG_DEGRADED_DURATION, 5.0 );
|
||||
init( TLOG_IGNORE_POP_AUTO_ENABLE_DELAY, 300.0 );
|
||||
init( TXS_POPPED_MAX_DELAY, 1.0 ); if ( randomize && BUGGIFY ) TXS_POPPED_MAX_DELAY = deterministicRandom()->random01();
|
||||
|
||||
// disk snapshot max timeout, to be put in TLog, storage and coordinator nodes
|
||||
init( SNAP_CREATE_MAX_TIMEOUT, 300.0 );
|
||||
|
|
|
@ -83,6 +83,7 @@ public:
|
|||
int DISK_QUEUE_MAX_TRUNCATE_BYTES; // A truncate larger than this will cause the file to be replaced instead.
|
||||
int TLOG_DEGRADED_DELAY_COUNT;
|
||||
double TLOG_DEGRADED_DURATION;
|
||||
double TXS_POPPED_MAX_DELAY;
|
||||
|
||||
// Data distribution queue
|
||||
double HEALTH_POLL_TIME;
|
||||
|
|
|
@ -1093,7 +1093,12 @@ struct TagPartitionedLogSystem : ILogSystem, ReferenceCounted<TagPartitionedLogS
|
|||
}
|
||||
}
|
||||
|
||||
wait( waitForAll(poppedReady) );
|
||||
state Future<Void> maxGetPoppedDuration = delay(SERVER_KNOBS->TXS_POPPED_MAX_DELAY);
|
||||
wait( waitForAll(poppedReady) || maxGetPoppedDuration );
|
||||
|
||||
if(maxGetPoppedDuration.isReady()) {
|
||||
TraceEvent(SevWarnAlways, "PoppedTxsNotReady", self->dbgid);
|
||||
}
|
||||
|
||||
Version maxPopped = 1;
|
||||
for(auto &it : poppedFutures) {
|
||||
|
|
Loading…
Reference in New Issue