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:
parent
8d97a15c3f
commit
06a9c7a772
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue