vectordotdev / vectordotdev/vector

Possible event loss with write race in `socket` sink

Open
#2,432 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

domain: networking have: should sink: socket
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.