Uploaded image for project: 'Apache Tez'
  1. Apache Tez
  2. TEZ-3974

Tez: Correctness regression of TEZ-955 in TEZ-2937

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 0.9.1
    • Fix Version/s: 0.9.2, 0.10.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      TEZ-2937 might have introduced a race condition for Tez output events, along with TEZ-2237

            // Close the Outputs.
            for (OutputSpec outputSpec : outputSpecs) {
              String destVertexName = outputSpec.getDestinationVertexName();
              initializedOutputs.remove(destVertexName);
              List<Event> closeOutputEvents = ((LogicalOutputFrameworkInterface)outputsMap.get(destVertexName)).close();
              sendTaskGeneratedEvents(closeOutputEvents,
                  EventProducerConsumerType.OUTPUT, taskSpec.getVertexName(),
                  destVertexName, taskSpec.getTaskAttemptID());
            }
      
            // Close the Processor.
            processorClosed = true;
            processor.close();
      

      As part of TEZ-2237, the outputs send empty events when the output is closed without being started (which happens in task init failures).

      These events are obsoleted when a task fails and this happens in the AM, but not before the dispatcher looks at them.

      Depending on the timing, the empty events can escape obsoletion & be sent to a downstream task.

      This gets marked as a SKIPPED event in the downstream task, which means that further obsoletion events sent to the downstream task is ignored (because a zero byte fetch is not repeated on node failure).

      So the downstream task can exit without actually waiting for the retry of the failed task and cause silent dataloss in case where the retry succeeds in another attempt.

      So if processor.close() throws an exception, this introduce a race condition and if the AM is too fast, we end up with correctness issues.

      This was originally reported in TEZ-955

        Attachments

        1. TEZ-3974.1.patch
          3 kB
          Jaume M
        2. TEZ-3974.2.patch
          10 kB
          Jaume M
        3. TEZ-3974.3.patch
          10 kB
          Gopal Vijayaraghavan

          Issue Links

            Activity

              People

              • Assignee:
                jmarhuen Jaume M
                Reporter:
                gopalv Gopal Vijayaraghavan
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: