Test: tracer_reload streams until the new file has events #465

Merged
jcoffey-dev merged 1 commits from fix/464-tracer-reload-stream into main 2026-11-19 01:37:46 +00:00
Owner

Fixes #464.

The path-change part of system::tracer_reload sent a fixed 2000 events and moved the tracer 5 ms in. The stream finishes in a few tens of ms, so on a fast machine every event reached the old file before the reload ran, and the test failed on main.

  • The stream now runs until the new file has some of it, behind a stop flag, capped at 500,000 events so a reload that never lands fails instead of filling the disk.
  • The move starts only once the old file has some of the stream, so the switch always lands mid-stream.
  • Each event sent is checked to be in exactly one file, and both files must have part of the stream. The count comes from the stream, not a constant.
  • The JSON-format and removal parts are unchanged.

Locally (STORE=RocksDb): 6 of 6 runs in a row passed, each with about 3,800 events, ~3,750 in the old file and 50–100 in the new one. cargo fmt --all --check and the fork checks are clean. Test-only change.

Fixes #464. The path-change part of `system::tracer_reload` sent a fixed 2000 events and moved the tracer 5 ms in. The stream finishes in a few tens of ms, so on a fast machine every event reached the old file before the reload ran, and the test failed on main. - The stream now runs until the new file has some of it, behind a stop flag, capped at 500,000 events so a reload that never lands fails instead of filling the disk. - The move starts only once the old file has some of the stream, so the switch always lands mid-stream. - Each event sent is checked to be in exactly one file, and both files must have part of the stream. The count comes from the stream, not a constant. - The JSON-format and removal parts are unchanged. Locally (`STORE=RocksDb`): 6 of 6 runs in a row passed, each with about 3,800 events, ~3,750 in the old file and 50–100 in the new one. `cargo fmt --all --check` and the fork checks are clean. Test-only change.
jcoffey-dev added 1 commit 2026-11-19 01:26:28 +00:00
Test: tracer_reload streams until the new file has events
ci / fork-checks (pull_request) Skipped
ci / build (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 10m47s
ff6f36970c
The path-change part sent a fixed 2000 events and moved the tracer 5 ms
in. The stream finishes in a few tens of ms, so on a fast machine every
event reached the old file before the reload ran and the test failed.

The stream now runs until the new file has some of it (capped at
500,000), starts the move only once the old file has some, and checks
every event it sent is in exactly one of the two files.

Fixes #464
jcoffey-dev merged commit 5a38f7cb08 into main 2026-11-19 01:37:46 +00:00
jcoffey-dev deleted branch fix/464-tracer-reload-stream 2026-11-19 01:37:46 +00:00
Sign in to join this conversation.