Skip to content

Deterministic tie order in four more count-only sorts (node analytics, node/bulk health) #321

Description

@dborup

Follow-up to #319 (#273), from the review of #319. The same tie-order bug class as #256/#293/#273: count-only sorts over map iteration with no secondary key, so tied entries come out in a random order on each call. All of them are shown to the user.

Site List Cap Frontend
cmd/server/node_analytics_summary.go:409 peerInteractions 20 (random cut) public/node-analytics.js:152
cmd/server/node_analytics_summary.go:391 observerCoverage none public/node-analytics.js:249
cmd/server/store.go:10521 observerRows (GetNodeHealth) none public/live.js:2694
cmd/server/store.go:10353 observerRows (GetBulkHealth) none same shape

Lower priority, same shape: cmd/server/store.go:9569 (collisions) sorts on class order, then Appearances, with no final key.

The peerInteractions cap makes the first site the most visible. With ties at the cut-off, which peers are shown changes between calls, not just their order.

Acceptance

Line numbers are from origin/master at 2820d18d and may drift.

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions