Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enforce monotonicity for timestamps in event parser (#1733)
Summary: Ensures that timestamps in the event parser are monotonically increasing. The current stitching logic for CQL relies on the assumption that frame deques are chronologically sorted based on their timestamps. Timestamps from eBPF, however, may not always be monotonic due to CPU variances, with potential discrepancies of [up to 880 usec](https://lore.kernel.org/bpf/CAJD7tkYOs4LKa=j+xNRMRiK=ors7_uCBtAjp6axRNQo0NHQqWA@mail.gmail.com/). This change catches potential anomalies due to non-monotonic timestamps by ensuring that the next frame's timestamp will always be greater than the previous one. The DataStreamBuffer itself relies on byte positions, not timestamps, for its internal ordering so it won't be affected by this timestamp issue directly. Although DataTables are sorted before being pushed to the TableStore, the timestamp variance from eBPF might still have implications. More experiments will be required to determine how frequently this condition is hit in the wild. Type of change: /kind bug Test Plan: Existing targets. --------- Signed-off-by: Benjamin Kilimnik <[email protected]>
- Loading branch information