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

Duplicated output in FileSource continuous ITCase with TM failover

    XMLWordPrintableJSON

Details

    Description

      If FileSourceTextLinesITCase::testContinuousTextFileSource includes TM restarts (after failing TM with TestingMiniCluster::terminateTaskExecutor, see testContinuousTextFileSourceWithTaskManagerFailover in branch) then sometimes I observe duplicated lines in the output after running the whole test suite FileSourceTextLinesITCase 5-10 times in IDE:

      Test testContinuousTextFileSourceWithTaskManagerFailover(org.apache.flink.connector.file.src.FileSourceTextLinesITCase) failed with:
      java.lang.AssertionError: 
      Expected: ["And by opposing end them?--To die,--to sleep,--", "And enterprises of great pith and moment,", "And lose the name of action.--Soft you now!", "And makes us rather bear those ills we have", "And thus the native hue of resolution", "Be all my sins remember'd.", "But that the dread of something after death,--", "Devoutly to be wish'd. To die,--to sleep;--", "For in that sleep of death what dreams may come,", "For who would bear the whips and scorns of time,", "Is sicklied o'er with the pale cast of thought;", "Must give us pause: there's the respect", "No more; and by a sleep to say we end", "No traveller returns,--puzzles the will,", "Or to take arms against a sea of troubles,", "Than fly to others that we know not of?", "That flesh is heir to,--'tis a consummation", "That makes calamity of so long life;", "That patient merit of the unworthy takes,", "The fair Ophelia!--Nymph, in thy orisons", "The heartache, and the thousand natural shocks", "The insolence of office, and the spurns", "The oppressor's wrong, the proud man's contumely,", "The pangs of despis'd love, the law's delay,", "The slings and arrows of outrageous fortune", "The undiscover'd country, from whose bourn", "Thus conscience does make cowards of us all;", "To be, or not to be,--that is the question:--", "To grunt and sweat under a weary life,", "To sleep! perchance to dream:--ay, there's the rub;", "When he himself might his quietus make", "When we have shuffled off this mortal coil,", "Whether 'tis nobler in the mind to suffer", "With a bare bodkin? who would these fardels bear,", "With this regard, their currents turn awry,"]
           but: was ["And by opposing end them?--To die,--to sleep,--", "And enterprises of great pith and moment,", "And lose the name of action.--Soft you now!", "And makes us rather bear those ills we have", "And thus the native hue of resolution", "Be all my sins remember'd.", "But that the dread of something after death,--", "Devoutly to be wish'd. To die,--to sleep;--", "Devoutly to be wish'd. To die,--to sleep;--", "For in that sleep of death what dreams may come,", "For who would bear the whips and scorns of time,", "Is sicklied o'er with the pale cast of thought;", "Must give us pause: there's the respect", "No more; and by a sleep to say we end", "No more; and by a sleep to say we end", "No traveller returns,--puzzles the will,", "Or to take arms against a sea of troubles,", "Than fly to others that we know not of?", "That flesh is heir to,--'tis a consummation", "That flesh is heir to,--'tis a consummation", "That makes calamity of so long life;", "The fair Ophelia!--Nymph, in thy orisons", "The heartache, and the thousand natural shocks", "The heartache, and the thousand natural shocks", "The slings and arrows of outrageous fortune", "The undiscover'd country, from whose bourn", "Thus conscience does make cowards of us all;", "To be, or not to be,--that is the question:--", "To grunt and sweat under a weary life,", "To sleep! perchance to dream:--ay, there's the rub;", "To sleep! perchance to dream:--ay, there's the rub;", "When we have shuffled off this mortal coil,", "Whether 'tis nobler in the mind to suffer", "With a bare bodkin? who would these fardels bear,", "With this regard, their currents turn awry,"]
      	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
      	at org.junit.Assert.assertThat(Assert.java:956)
      	at org.junit.Assert.assertThat(Assert.java:923)
      	at org.apache.flink.connector.file.src.FileSourceTextLinesITCase.verifyResult(FileSourceTextLinesITCase.java:198)
      	at org.apache.flink.connector.file.src.FileSourceTextLinesITCase.testContinuousTextFileSource(FileSourceTextLinesITCase.java:151)
      	at org.apache.flink.connector.file.src.FileSourceTextLinesITCase.testContinuousTextFileSourceWithTaskManagerFailover(FileSourceTextLinesITCase.java:109)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
      	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      	at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
      	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
      	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
      	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
      	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
      	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
      

      Attachments

        1. log
          168 kB
          Andrey Zagrebin
        2. collect-debug-jm.png
          80 kB
          Caizhi Weng
        3. collect-debug.png
          32 kB
          Caizhi Weng

        Issue Links

          Activity

            People

              sewen Stephan Ewen
              azagrebin Andrey Zagrebin
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: