Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-22604

NPE on bundle close when task failover after a failed task open

    XMLWordPrintableJSON

Details

    Description

      We observed a NullPointerException when job failover after a failed task open(e.g., stuck on initializing), this should be avoid.

      A simulated case will reproduce the exception:

      
      @Test
      def testCloseWithoutOpen(): Unit = {
          val (testHarness, outputType) = createAggregationWithDistinct  // see detail in the patch
          testHarness.setup(new RowDataSerializer(outputType: _*))
          // simulate a failover after a failed task open(e.g., stuck on initializing)
          // expect no exception happens
          testHarness.close()
      }
      
      

      exception:

      
      java.lang.NullPointerExceptionjava.lang.NullPointerException at org.apache.flink.table.runtime.operators.bundle.AbstractMapBundleOperator.finishBundle(AbstractMapBundleOperator.java:134) at org.apache.flink.table.runtime.operators.bundle.AbstractMapBundleOperator.close(AbstractMapBundleOperator.java:156) at org.apache.flink.streaming.util.AbstractStreamOperatorTestHarness.close(AbstractStreamOperatorTestHarness.java:691)
      
      

       

       

      Attachments

        Issue Links

          Activity

            People

              lincoln.86xy lincoln lee
              lincoln.86xy lincoln lee
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: