Skip to content

Reject buffered writes after BufferedWriteSyncer.Stop - #1594

Open
Shubham-Padkonde wants to merge 1 commit into
uber-go:masterfrom
Shubham-Padkonde:fix/reject-buffered-writes-after-stop
Open

Shubham-Padkonde wants to merge 1 commit into
uber-go:masterfrom
Shubham-Padkonde:fix/reject-buffered-writes-after-stop

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

BufferedWriteSyncer.Write currently returns success after Stop, buffering data after the periodic flush loop has exited. Calling Stop again does not flush that data. Stop before the first Write also permits the writer to start later.

Record the stopped state even before initialization and return io.ErrClosedPipe with zero bytes for subsequent writes. Document the behavior and test both initialized and unused writers, including repeated Stop calls.

Validation: both new regression cases fail before the fix. Full make test passed with the race detector across all four modules. make lint reports two existing gofumpt findings; both were reproduced with unchanged upstream implementation. No new lint finding was introduced.

Prepared with Codex assistance.

@CLAassistant

CLAassistant commented Sep 16, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants