vectordotdev / vectordotdev/vector
Possible event loss with write race in `socket` sink
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 22.6k
- Forks
- 2.3k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 146
Description
After #2429 it is still possible to lose an event if the write fails. We still have a copy of the event at the time the error is surfaced so we should treat this as a failure to submit and we should re-attempt sending the event after reconnecting. This would mean we no longer want to use FramedWrite and should also store a slot for the event. This mostly can happen if the connection got forced shut unexpectedly. This should be rare but means that there is a minor possibility that we can lose a single event.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the Rust socket sink changes introduced by #2429, focusing on write-error handling and reconnect behavior. Determine where the in-flight event can be retained, then verify that a forced disconnect or failed write retries that event after reconnecting without loss.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100