Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-5083

RecordIterator can sometimes restart a query on close

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.0
    • Fix Version/s: 1.11.0
    • Component/s: None
    • Labels:

      Description

      This one is very confusing...

      In a test with a MergeJoin and external sort, operators are stacked something like this:

      Screen
      - MergeJoin
      - - External Sort
      ...
      

      Using the injector to force a OOM in spill, the external sort threw a UserException up the stack. This was handed by:

      IteratorValidatorBatchIterator.next( )
      RecordIterator.clearInflightBatches( )
      RecordIterator.close( )
      MergeJoinBatch.close( )
      

      Which does the following:

            // Check whether next() should even have been called in current state.
            if (null != exceptionState) {
              throw new IllegalStateException(
      

      But, the exceptionState is set, so we end up throwing an IllegalStateException during cleanup.

      Seems the code should agree: if next( ) will be called during cleanup, then next( ) should gracefully handle that case.

        Attachments

        1. DrillOperatorErrorHandlingRedesign.pdf
          191 kB
          Paul Rogers
        2. Reproduce5083.jpg
          306 kB
          Roman Kulyk

          Issue Links

            Activity

              People

              • Assignee:
                RomanKulyk Roman Kulyk
                Reporter:
                paul-rogers Paul Rogers
                Reviewer:
                Khurram Faraaz
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: