Remove unnecessary policy recomputations in confirmEpochLive.

Watching for interface changes on readied servers was done as a workaround for
a case where all futures could be ready, but the policy verification would
never succeed.  This turns out to be because stopping a tlog causes an error to
be returned.  However, if a TLog is stopped, then we know that we can't do any
more commits, so we can just immediately stop trying and never mark our future
as ready.
This commit is contained in:
Alex Miller 2017-09-13 15:45:09 -07:00
parent 8d97a15c3f
commit 06a9c7a772
1 changed files with 4 additions and 2 deletions

View File

@ -368,8 +368,10 @@ struct TagPartitionedLogSystem : ILogSystem, ReferenceCounted<TagPartitionedLogS
for (int i = 0; i < alive.size(); i++) {
if (!alive[i].isReady()) {
changes.push_back( ready(alive[i]) );
} else {
changes.push_back( self->logServers[i]->onChange() );
} else if (alive[i].isReady() && alive[i].isError() &&
alive[i].getError().code() == error_code_tlog_stopped) {
// All commits must go to all TLogs. If any TLog is stopped, then our epoch has ended.
return Never();
}
}
ASSERT(changes.size() != 0);