Fix concurrent map races in Statelet, collector, and session cache - #108
Open
alexis779 wants to merge 1 commit into
Open
Fix concurrent map races in Statelet, collector, and session cache#108alexis779 wants to merge 1 commit into
alexis779 wants to merge 1 commit into
Conversation
Statelet column names, collector parent indexes, predicate registry, and session cache JSON could fatal with concurrent map iteration or write.
alexis779
force-pushed
the
reproduce-column-names-map-race
branch
from
September 9, 2026 05:02
97521a2 to
3574859
Compare
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.
Summary
concurrent map iteration and map write(and the read/write variant) under parallel reads.Statelet._columnNamesis the production path:CloneForSummaryranged the map whileAddwrote it. Collector parent indexes,PredicateRegistry, session cache JSON, andTypes.Lookuphad the same shape.Fixes #107.
Test plan
go test -timeout 10s -count=1 -run TestStateletCloneForSummaryConcurrentColumnNames ./view/— crashed before the lock, passes after 3sgo test -timeout 10s -count=1 -run TestCollectorConcurrentParentValuePositions ./view/go test -timeout 10s -count=1 -run TestPredicateRegistryConcurrentLookupAndAdd ./view/extension/go test -timeout 10s -count=1 -run TestSessionMarshalJSONConcurrentCachePut ./service/session/go test -timeout 10s -count=1 -run TestDataUnitConcurrentSliceIndex ./service/executor/expand/go test -timeout 10s -count=1 -run TestTypesConcurrentLookupAndPut ./view/state/