Repository navigation
Read the in-flight proposal and its prepared flag together for ViewData - #711
Merged
Merged
Conversation
prepareViewDataMsg read the in-flight proposal and whether it is prepared with two separate calls, each taking the InFlightData lock on its own. If a new proposal was stored between the two calls, the view data paired one proposal with the prepared flag of another. Add InFlightData.InFlightProposalAndPrepared, which returns both under one lock, and use it when building the view data. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Hagar Meir <hagar.meir@ibm.com>
pfi79
approved these changes
Oct 18, 2026
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.
Written by Claude (Anthropic's AI assistant) on behalf of Hagar Meir.
Fixes #710.
prepareViewDataMsgread the in-flight proposal and whether it is prepared with two separate calls, each taking theInFlightDatalock on its own. If a new proposal was stored between the two calls, the ViewData paired one proposal with the prepared flag of another.Changes
InFlightData.InFlightProposalAndPreparedreturns both values under one lock.prepareViewDataMsguses it, and passes the proposal togetInFlight, which no longer readsInFlightDataitself.TestViewDataInFlightWhileStoredbuilds 100,000 ViewData messages while proposals are stored concurrently, with only some of them prepared. It checks that no ViewData reports a never-prepared proposal as prepared. Onmainit fails with a few hundred such messages.No message format changes.
🤖 Generated with Claude Code