Skip to content

fix(ray): merge guards — deleted event, other project, size cap - #400

Merged
butschster merged 2 commits into
masterfrom
fix/ray-merge-guards
Nov 7, 2026
Merged

butschster merged 2 commits into
masterfrom
fix/ray-merge-guards

Conversation

@butschster

Copy link
Copy Markdown
Member

Follow-up to #396 (review notes), refs #345.

Changes

  • Store.UpdatePayload returns event.ErrNotFound when no row was updated. A follow-up whose event was deleted between the lookup and the update is stored as a new event, instead of re-broadcasting a deleted event (ghost in the UI) and losing the follow-up.
  • A follow-up merges only into an event of the same project; another project's event with the same uuid is never changed.
  • A Ray event takes at most 1000 payloads and 8 MB. Further follow-ups are dropped with a warning in the log (each follow-up rewrites and re-broadcasts the whole event, so without a cap N follow-ups cost O(N²)).

Tests

go test -race ./modules/ray/ ./internal/server/http/ ./internal/storage/ ./internal/metrics/ ./internal/event/; new TestRay_FollowUpOfDeletedEvent, TestRay_FollowUpOtherProject, TestRay_MergeLimit, TestSQLiteStore_UpdatePayloadMissing.

Made with harnsy

Review notes on #396: a follow-up whose event was deleted between the
lookup and the update is stored as a new event instead of re-broadcasting
a deleted one; an event of another project with the same uuid is never
changed; a Ray event takes at most 1000 payloads / 8 MB, further
follow-ups are dropped with a warning (each one rewrites and re-broadcasts
the whole event).

Refs #345
@butschster butschster added type: bug Something is broken or behaves incorrectly module: ray Affects module: ray labels Nov 7, 2026
@butschster
butschster merged commit 08d115e into master Nov 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: ray Affects module: ray type: bug Something is broken or behaves incorrectly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant