fix(api): share concurrent HTTP shutdown result - #14
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked Issue
Fixes #13
Summary
Shutdowncaller the sole owner of the drain deadlineRequired Format
feat/,fix/,docs/,test/,refactor/,perf/,security/,chore/,ci/,build/,release/, orrevert/.fix(consensus): reject equivocated proposer slots.Scope And Project Status
No performance claim is introduced.
Protocol, Safety, And Compatibility
Apply.This is a local lifecycle synchronization fix. The initiating caller still must provide a deadline and continues to bound the drain. Later callers cannot shorten, extend, or replace that operation; they only observe its stored terminal result. There are no runtime users or compatibility requirements.
Validation
git diff --checkpython3 scripts/check_docs.pygo mod verifyand a cleango mod tidydiffgo vet ./...go test -count=1 -mod=readonly ./...go test -race -count=1 -mod=readonly ./...python3 scripts/check_go_architecture.pyAdditional focused validation:
go test -count=30 ./pkg/api/httpservergo test -race -count=30 ./pkg/api/httpserver-race -count=100amd64andarm64static builds with-trimpathProtocol, storage, Byzantine, partition, snapshot, and chaos suites are not applicable because this change modifies only in-process operational HTTP shutdown coordination.
Risk And Rollback
Risk is limited to callers that intentionally expected their later private context to return before the already-running shutdown. That behavior contradicted the documented terminal-state contract and has no released users. The initiating deadline still guarantees a bounded outcome.
Rollback by reverting this commit; no data, schema, listener configuration, dependency, or migration is involved.