eventhub/README_PATCH.md

26 lines
1.3 KiB
Markdown

# Fix: cardAbsentCoveragePercent above 100% on reused Esper runtime
## Root cause
`DriverWorkingTimeReusableProjectionBuilder` pools Esper runtimes. The EPL used
`VuCardAbsentInterval#keepall` as a statement-local data window, but the runtime
cleanup did not clear that retained state before the next execution.
When the same pooled runtime processed a second request, the previous execution's
card-absent intervals remained in the overlap calculation. New intervals were
added again, so `cardAbsentDurationSeconds` was doubled while the output listener
still reported only the newly emitted `VuCardAbsentInterval` events.
This is source-independent. It appeared in the DB result because that request was
executed after the file-session request on the same pooled runtime.
## Changes
- Added public named window `VuCardAbsentIntervalWindow#keepall`.
- Routed generated `VuCardAbsentInterval` events into the named window.
- Changed rest-coverage overlap calculations to read from the named window.
- Added `delete from VuCardAbsentIntervalWindow` to reusable-runtime cleanup.
- Applied the same EPL structure to the legacy/reference projection bundle.
- Added a regression test that executes the same input twice on the same builder
and verifies coverage does not double and remains at or below 100%.