Skip to content

protocol: stats list counts use u16, limiting to 65k entries #164

@vieiralucas

Description

@vieiralucas

Problem

GetStatsResult encodes per_key_stats and per_throttle_stats counts as u16, capping at 65,535 entries per list. If a queue has more fairness keys or throttle keys than that, the response is silently truncated (with a warn log added in Epic 20).

65k distinct fairness keys on a single queue is reachable for high-cardinality workloads (e.g., per-customer fairness on a shared queue at scale).

Proposed fix

Change per_key_stats and per_throttle_stats counts from u16 to u32 in docs/protocol.md and crates/fila-fibp/src/types.rs. This is a wire format change that needs coordinated updates across server + all SDKs.

Files affected

  • docs/protocol.md — GetStatsResult frame format
  • crates/fila-fibp/src/types.rs — encode/decode for FibpGetStatsResponse
  • All external SDKs (Go, Python, JS, Ruby, Java) — stats response parsing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions