Fix data race between rule-set updates and matching - #4353
Open
solodecode wants to merge 1 commit into
Open
Conversation
solodecode
marked this pull request as ready for review
July 27, 2026 02:12
nekohasekai
force-pushed
the
testing
branch
3 times, most recently
from
July 27, 2026 09:41
b7bf9cf to
a90fcbc
Compare
solodecode
force-pushed
the
agent/fix-ruleset-reload-race
branch
from
July 27, 2026 13:43
00334d3 to
555ac63
Compare
solodecode
force-pushed
the
agent/fix-ruleset-reload-race
branch
from
July 28, 2026 00:48
555ac63 to
30c122e
Compare
solodecode
force-pushed
the
agent/fix-ruleset-reload-race
branch
from
July 28, 2026 13:21
30c122e to
cb056cc
Compare
nekohasekai
force-pushed
the
testing
branch
7 times, most recently
from
July 29, 2026 11:17
f49758b to
1569c52
Compare
solodecode
force-pushed
the
agent/fix-ruleset-reload-race
branch
from
July 29, 2026 13:15
cb056cc to
ad918d6
Compare
nekohasekai
force-pushed
the
testing
branch
2 times, most recently
from
July 29, 2026 13:44
067b00f to
4f7f894
Compare
solodecode
force-pushed
the
agent/fix-ruleset-reload-race
branch
from
July 29, 2026 23:48
ad918d6 to
548aff2
Compare
nekohasekai
force-pushed
the
testing
branch
2 times, most recently
from
July 31, 2026 08:16
2557cf6 to
f141553
Compare
solodecode
force-pushed
the
agent/fix-ruleset-reload-race
branch
from
July 31, 2026 11:51
548aff2 to
9671e8a
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.
LocalRuleSet.reloadRulesandRemoteRuleSet.updateOncereplaces.rulesunderaccess, whileMatch,String,ExtractIPSet, andmergeableRuleread it without taking the lock. A local reload or remote update can therefore race with active route matching.Read
s.rulesthrough a snapshot taken underRLock, and protect the writes inCleanupandClosewithLock. Add a regression test that updates local and remote rule-sets while concurrent readers callMatch,String, andmergeableRule.Tested with
go test -race ./route/rule.