Skip to content

fix: report request drops during flush preparation - #191

Open
pcbeingused33 wants to merge 1 commit into
Countly:masterfrom
pcbeingused33:fix/flush-event-queue-overflow
Open

pcbeingused33 wants to merge 1 commit into
Countly:masterfrom
pcbeingused33:fix/flush-event-queue-overflow

Conversation

@pcbeingused33

Copy link
Copy Markdown

flush() packs recorded events before registering which requests to wait for. When packing fills the request queue and evicts a request, the flush can report success after delivering only the surviving requests.

Track queue evictions during flush preparation and return false if a request was lost. Continue processing the remaining requests and preserve the existing treatment of in-flight requests, which can still complete after eviction.

The delivery regression test records three events with a queue size and batch size of one. It verifies that the mock server receives the last two events and that flush() returns false. The delivery suite went from 15 passing and one failing to 16 passing.

This change was prepared with AI assistance.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant