Skip to content

perf(gateway): share one group event snapshot per transaction across recipients #607

Closed

Description

@Mathih13

This was generated by AI during triage.

PR #605 made the group event relay send one transaction's rows in insert order. For that, wire_group_events (gateway/src/stdb/world_view.rs) reads the cached game_group_event table once per transaction per recipient with a session. A transaction with many recipients, such as a 40-member Raid roster list or a loot roll, repeats the same table copy on the shared coordinator pump.

The event GC holds rows for about one second, so the table stays small and the cost has a ceiling. The work still grows with recipients × cached rows for every burst.

Done when: each source database collects one transaction's rows once, and each recipient takes its slice from that snapshot. The ordering guarantee and the per-database cursor from #605 stay the same. A test proves one table read per transaction for many recipients.

Note: the existing by_recipient index is on recipient_identity, not recipient_guid, so it does not serve this lookup directly.

Raised by CodeRabbit on #605.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions