Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Continuous queries: event-time windows (watermarking) instead of processing-time boundaries #523

Copy link
Copy link

Description

@xe-nvdk
Issue body actions

Summary

CQ window boundaries are based on processing/wall-clock time (endTime = time.Now()), not the event time in the data. Correctness of a given window therefore assumes the data for that window has been ingested by the moment the interval fires. For feeds that are bursty, delayed, or out-of-order (common in financial data), this couples aggregate correctness to ingestion timing rather than to the data's own timestamps.

Current behavior (code)

  • internal/api/continuous_query.go:464-470endTime = time.Now().UTC(); the window is [last_processed_time, now) on wall-clock. The user's query filters on the data's time column via {start_time}/{end_time} placeholders, but the boundary advance is wall-clock, so events whose event-time falls in a window that has already been closed are missed.

Proposed direction (larger, architectural)

  • Track a watermark on the data's event-time column (e.g. max observed event time minus an allowed-lateness bound) and advance CQ windows by event-time watermark rather than wall-clock.
  • Lets windows close based on observed data progress, with bounded allowed-lateness, which is the standard streaming-aggregation model.

Relationship to other issues

Evidence

  • internal/api/continuous_query.go:464-470
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.