fix: only peekSingle needs to throw worker_removed, because tlogs have other ways to get notified they are no longer needed

fix: we need to wait until tags are popped past recoveredAt instead of unrecovered before
This commit is contained in:
Evan Tschannen 2018-04-23 16:43:08 -07:00
parent 126fc53d10
commit 3ec09ce9f6
2 changed files with 3 additions and 3 deletions

View File

@ -898,7 +898,7 @@ ACTOR Future<Void> tLogPop( TLogData* self, TLogPopRequest req, Reference<LogDat
TraceEvent("TLogPoppedUn", logData->logId).detail("tag", req.tag.toString()).detail("to", req.to).detail("unrecovered", logData->unrecoveredBefore);
}
if(tagData->unpoppedRecovered && req.to > logData->unrecoveredBefore) {
if(tagData->unpoppedRecovered && req.to > logData->recoveredAt) {
tagData->unpoppedRecovered = false;
logData->unpoppedRecoveredTags--;
TraceEvent("TLogPoppedTag", logData->logId).detail("tags", logData->unpoppedRecoveredTags).detail("tag", req.tag.toString());

View File

@ -434,7 +434,7 @@ struct TagPartitionedLogSystem : ILogSystem, ReferenceCounted<TagPartitionedLogS
int i = 0;
while(begin < lastBegin) {
if(i == oldLogData.size()) {
throw worker_removed();
return Reference<ILogSystem::ServerPeekCursor>( new ILogSystem::ServerPeekCursor( Reference<AsyncVar<OptionalInterface<TLogInterface>>>(), tag, begin, getPeekEnd(), false, false ) );
}
int bestOldSet = -1;
@ -496,7 +496,7 @@ struct TagPartitionedLogSystem : ILogSystem, ReferenceCounted<TagPartitionedLogS
if(tag == txsTag) {
break;
}
throw worker_removed();
return Reference<ILogSystem::ServerPeekCursor>( new ILogSystem::ServerPeekCursor( Reference<AsyncVar<OptionalInterface<TLogInterface>>>(), tag, begin, getPeekEnd(), false, false ) );
}
int bestOldSet = -1;