Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-21722

Sql. NPE in correlated nested loop join

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0
    • sql

    Description

      See stack trace below:

      Caused by: java.lang.NullPointerException
      	at org.apache.ignite.internal.sql.engine.exec.rel.CorrelatedNestedLoopJoinNode.join(CorrelatedNestedLoopJoinNode.java:362)
      	at org.apache.ignite.internal.sql.engine.exec.rel.CorrelatedNestedLoopJoinNode.lambda$onRequest$1(CorrelatedNestedLoopJoinNode.java:274)
      	at org.apache.ignite.internal.sql.engine.exec.ExecutionContext.lambda$execute$0(ExecutionContext.java:320)
      	... 4 more
      
      

      To reproduce the issue, run TPC-H q21 with sf=0.1 on 3-node cluster

      Update

      The following sequence occurs:

      1. CorrelatedNestedLoopJoinNode pushes last row to downstream (FilterNode). See joinType == JoinRelType.LEFT branch in join() method.
      2. FilterNode receives last requested row and tries to request next batch from the upstream (CorrelatedNestedLoopJoinNode).
      3. CorrelatedNestedLoopJoinNode is in IDLE state (which is incorrect), so it submits join() to the execution queue.
      4. CorrelatedNestedLoopJoinNode resets rightInBuf, changes state to FILLING_LEFT and requests rows from leftsource().
      5. Previously submitted join() starts executing and crashes with NullPointerException, because rightInBuf is null.

      Attachments

        Issue Links

          Activity

            People

              xtern Pavel Pereslegin
              korlov Konstantin Orlov
              Votes:
              0 Vote for this issue
              Watchers:
              2 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