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

Flink CEP discards events as late if they have timestamps <= 0

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Auto Closed
    • Affects Version/s: 1.7.2
    • Fix Version/s: None
    • Component/s: Library / CEP
    • Labels:

      Description

      Let's make an input stream like this:

      env.setStreamTimeCharacteristic(TimeCharacteristic.EventTime)
      val events = env.fromElements(
            Event(timestamp = 0L, siteId),
            Event(timestamp = 500L, siteId)
      )
      .assignTimestampsAndWatermarks(new BoundedOutOfOrdernessTimestampExtractor{...})
      

      For this stream the event with timestamp = 0L will be treated as late. The reason is AbstractKeyedCEPPatternOperator that initializes lastWatermark with the default value provided by the compiler: zero. Would it be more correct to initialize lastWatermark with Long.MIN_VALUE?

      Of course, this is not a blocking defect, but I had really hard times to find why my unit test disregards the first event. Strictly speaking, this behavior seems incorrect.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tashoyan Arseniy Tashoyan

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment