Move trackerCancelled higher in catch block

This commit is contained in:
Andrew Noyes 2020-11-24 20:34:06 +00:00
parent dc2bac5670
commit b8a9807336
1 changed files with 1 additions and 1 deletions

View File

@ -4979,12 +4979,12 @@ ACTOR Future<Void> dataDistribution(Reference<DataDistributorData> self, Promise
return Void(); return Void();
} }
catch( Error &e ) { catch( Error &e ) {
trackerCancelled = true;
state Error err = e; state Error err = e;
TraceEvent("DataDistributorDestroyTeamCollections").error(e); TraceEvent("DataDistributorDestroyTeamCollections").error(e);
self->teamCollection = nullptr; self->teamCollection = nullptr;
primaryTeamCollection = Reference<DDTeamCollection>(); primaryTeamCollection = Reference<DDTeamCollection>();
remoteTeamCollection = Reference<DDTeamCollection>(); remoteTeamCollection = Reference<DDTeamCollection>();
trackerCancelled = true;
wait(shards.clearAsync()); wait(shards.clearAsync());
if (err.code() != error_code_movekeys_conflict) throw err; if (err.code() != error_code_movekeys_conflict) throw err;
bool ddEnabled = wait( isDataDistributionEnabled(cx) ); bool ddEnabled = wait( isDataDistributionEnabled(cx) );