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

VertexStatus is missing in TestLocalMode if DAG finishes too early - causing NPE in unit test

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.10.3
    • None
    • None

    Description

      this problem is very hard to reproduce, but when I was able to do so, it was like:

      2023-02-13 11:32:16,302 INFO  [DAGAppMaster Thread] app.DAGAppMaster (DAGAppMaster.java:startDAG(2545)) - Running DAG: testMultipleClientsWithoutSession2_useDfs
      ...
      2023-02-13 11:32:16,406 INFO  [Thread-675] client.DAGClientImpl (DAGClientImpl.java:getVertexStatusInternal(280)) - getVertexStatusInternal for Sleep, dagCompleted: true, in cache: false
      

      in this case, the latter log message was added here as:

          LOG.info("getVertexStatusInternal for {}, dagCompleted: {}, in cache: {}", vertexName, dagCompleted,
              cachedVertexStatus.containsKey(vertexName));
      

      so, the dag has already completed, but there were no vertex status updates yet (cache was empty), so unit tests failed with an inconvenient NPE

      this bug was always there, but got exposed by unit tests added in TEZ-4447
      the easiest way to solve this is to simply prevent the dag finish too early

      Attachments

        Issue Links

          Activity

            People

              abstractdog László Bodor
              abstractdog László Bodor
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m