-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
26979: storage: simplify quota pool deallocation for failed proposals r=benesch a=nvanbenschoten This change simplifies the process of releasing quota back into the quota pool on failed proposals. It does so by pushing all quota management into Raft instead of having the request's goroutine try to determine whether it needs to release quota based on the error in the proposal result. Quota management used to only be handled by Raft for successful proposals. In doing so, the change removes a case where quota could be double freed: proposals that apply and then return an error. This isn't particularly important though, because this pattern is never used anymore. Besides being a simplification, this is important for #26599 because transaction pipelining depends on requests pushing proposals into Raft and then returning immediately. In that model (asyncConsensus) the request's goroutine is not around to release quota resources on failed proposals. Release note: None Co-authored-by: Nathan VanBenschoten <[email protected]>
- Loading branch information
Showing
4 changed files
with
63 additions
and
58 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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