Skip to content

fix(runner): read results from a file sink - #63

Merged
catinspace-au merged 1 commit into
mainfrom
fix/vector-runner-drain
Nov 2, 2026
Merged

catinspace-au merged 1 commit into
mainfrom
fix/vector-runner-drain

Conversation

@catinspace-au

Copy link
Copy Markdown
Contributor

test_runner_processes_logs_through_the_real_binary failed on main in run 41522543968: 1 event returned for 2 input events. The same commit passed on its push run.

About 1 run in 1,400 returns one event for a two-event input, with exit 0 and empty stderr. The failing trace records both events reaching the console sink and normal completion, but output contains one line.

The console sink uses Tokio's stdout, queuing each write on a blocking thread without flushing. Writes not started when Vector exits are dropped. Closing stdin starts shutdown, when events are lost. With stdin held open 100 ms before closing, no events were lost in 3,600 runs.

The runner uses a file sink that flushes and syncs before completion. The runner reads the file after Vector exits.

A unit test checks that the sink type is file. A repeat-run test has about a 1 time in 8 chance of catching a 1 in 1,400 loss.

For the same two-event input on two pinned cores with three workers:

  • Console sink: 19 lost events in 27,000 runs.
  • File sink: 0 in 24,000.

hyperi-ci check passes 1,087 tests and the quality tier. No Release trailer means no release is published.

About 1 run in 1,400 returned one event for a two-event input, with exit 0 and empty stderr. This failed test_runner_processes_logs_through_the_real_binary on main.

The console sink writes through Tokio's stdout, which queues each write on a blocking thread and never flushes. Vector exits when stdin ends, and a write that has not started by then is dropped.

The file sink flushes and syncs before finishing. The runner reads results from the file after Vector exits. On two pinned cores the old sink lost an event in 19 of 27,000 runs and the file sink in 0 of 24,000.
@catinspace-au
catinspace-au merged commit 8987da0 into main Nov 2, 2026
16 checks passed
@catinspace-au
catinspace-au deleted the fix/vector-runner-drain branch November 2, 2026 22:56
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