Merge pull request #3382 from citusdata/fix-error-on-repeated-placement-done

PlacementExecutionDone: We may mark placements as failed multiple times
pull/3387/head
Philip Dubé 2020-01-15 18:52:58 +00:00 committed by GitHub
commit f6d4df6da9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -3491,6 +3491,15 @@ PlacementExecutionDone(TaskPlacementExecution *placementExecution, bool succeede
TaskExecutionState executionState = shardCommandExecution->executionState;
bool failedPlacementExecutionIsOnPendingQueue = false;
if (placementExecution->executionState == PLACEMENT_EXECUTION_FAILED)
{
/*
* We may mark placements as failed multiple times, but should only act
* the first time. Nor should we accept success after failure.
*/
return;
}
/* mark the placement execution as finished */
if (succeeded)
{