Skip to content

Commit

Permalink
TEZ-4569: SCATTER_GATHER + BROADCAST hangs on DAG Recovery
Browse files Browse the repository at this point in the history
  • Loading branch information
okumin committed Jun 12, 2024
1 parent deac035 commit 5f73712
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2817,6 +2817,18 @@ private VertexState setupVertex() {
return VertexState.INITED;
}

private boolean canSkipInitializingParents() {
// Both cases use RootInputVertexManager. RootInputVertexManager can start tasks even though
// any parents are not fully initialized.
if (vertexPlan.hasVertexManagerPlugin()) {
final VertexManagerPluginDescriptor pluginDesc = DagTypeConverters
.convertVertexManagerPluginDescriptorFromDAGPlan(vertexPlan.getVertexManagerPlugin());
return pluginDesc.getClassName().equals(RootInputVertexManager.class.getName());
} else {
return inputsWithInitializers != null;
}
}

private boolean isVertexInitSkippedInParentVertices() {
for (Map.Entry<Vertex, Edge> entry : sourceVertices.entrySet()) {
if(!(((VertexImpl) entry.getKey()).isVertexInitSkipped())) {
Expand All @@ -2843,7 +2855,7 @@ private void assignVertexManager() throws TezException {
if (recoveryData != null && recoveryData.shouldSkipInit()
&& (recoveryData.isVertexTasksStarted() ||
recoveryData.getVertexConfigurationDoneEvent().isSetParallelismCalled())
&& isVertexInitSkippedInParentVertices()) {
&& (canSkipInitializingParents() || isVertexInitSkippedInParentVertices())) {
// Replace the original VertexManager with NoOpVertexManager if the reconfiguration is done in the last AM attempt
VertexConfigurationDoneEvent reconfigureDoneEvent = recoveryData.getVertexConfigurationDoneEvent();
if (LOG.isInfoEnabled()) {
Expand Down

0 comments on commit 5f73712

Please sign in to comment.