Skip to content

Store and collector fixes from the review - #24

Merged
snaketech-tu merged 1 commit into
fix/private-tunnelfrom
fix/store-and-collector
Nov 10, 2026
Merged

snaketech-tu merged 1 commit into
fix/private-tunnelfrom
fix/store-and-collector

Conversation

@snaketech-tu

Copy link
Copy Markdown
Owner

Merge after "Keep the SSH tunnel private". Its base is that branch, so this shows only its own changes.

Changes

  • Clear during a read: a batch read before "Clear stored logs" is no longer stored after it. The store checks the clear count under its write lock.
  • Another server behind a connection: Stackline no longer deletes the stored lines by itself. It pauses collecting and shows a banner: keep the old logs, or delete them (POST /c/{id}/host).
  • Size limit: each connection gets a fair share. Only connections above their share lose their oldest lines, so a busy server no longer pushes out a quiet one.
  • First reads: a replica read for the first time (up to hours of lines) no longer holds up the others. At most 2 first reads run beside the normal poll.
  • Deploys: they are found among thousands of other events (the Overview missed them before).

Tests

  • New tests for each fix: clear during a read, fair share, host change, many events, slow first read.
  • Tried on real Docker; screenshot of the banner checked.
  • cargo test, clippy, fmt and npm run check pass.

- A clear can no longer leave a batch behind: the store checks the clear
  counter under its write lock and moves the cursor in the same step
- Another server behind a connection pauses collecting and asks whether
  to keep or delete the old logs, instead of deleting them silently
- Over the size limit, connections share the space equally; only those
  above their share lose lines
- First reads of a replica run in the background, two at a time, so a
  slow one no longer holds up the other replicas and the events
- Deploys are looked up by kind instead of among the newest 5,000 events
@snaketech-tu
snaketech-tu merged commit 841ddfe into fix/private-tunnel Nov 10, 2026
1 check passed
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