Skip to content

Commit

Permalink
clean assigned workers before instantiating.
Browse files Browse the repository at this point in the history
The fragment may have been instantiated in a previous iteration with relations having different partitioning schemata that the current iteration caused by overwritting. Not cleaning up the assigned worker set gives us false conflicts.
  • Loading branch information
jingjingwang committed Sep 18, 2015
1 parent c6d7238 commit 2448ba1
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -413,6 +413,11 @@ private static void assignWorkersToFragments(final List<PlanFragmentEncoding> fr

/* 1. Honor user overrides. Note this is unchecked, but we may find constraint violations later. */
for (PlanFragmentEncoding fragment : fragments) {
/*
* First, set it to be null since the fragment may have been instantiated in a previous iteration, but affected
* relations now may have different partitioning schemes than in the previous iteration.
*/
fragment.workers = null;
if (fragment.overrideWorkers != null && fragment.overrideWorkers.size() > 0) {
/* The workers are set in the plan. */
fragment.workers = fragment.overrideWorkers;
Expand Down

0 comments on commit 2448ba1

Please sign in to comment.