You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "wyf027 (via GitHub)" <gi...@apache.org> on 2026/07/14 07:50:12 UTC
[PR] fix: synchronize condition matcher registries [dubbo-go]
wyf027 opened a new pull request, #3492:
URL: https://github.com/apache/dubbo-go/pull/3492
Fixes #3248
## Summary
- protect the condition matcher and pattern-value extension registries with independent RWMutexes
- copy factories while holding a read lock, then invoke them after unlocking so extension constructors can safely re-enter registration APIs
- return structural snapshots from GetAllMatcher and GetAllValuePattern so callers cannot mutate global registration state
- add snapshot-isolation and concurrent access coverage for both registries
## Scope
This PR addresses only the extension-safety and API-hygiene subitems of #3248 for the condition router registries. It does not change matcher semantics or route evaluation.
## Testing
- `go test ./cluster/router/condition/matcher/... -count=20`
- `go test -race ./cluster/router/condition/matcher/... -count=10`
- `go test ./cluster/router/condition/... -count=10`
- `go test -race ./cluster/router/condition/... -count=10`
- `go vet ./cluster/router/condition/...`
- `golangci-lint run ./cluster/router/condition/...`
- `make check-fmt`
- `make test`
## Checklist
- [x] Target branch is `develop`
- [x] New behavior is covered by tests
- [x] Formatting, lint, race, and full test suites pass locally
- [x] Commit includes a Signed-off-by trailer
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] fix: synchronize condition matcher registries [dubbo-go]
Posted by "Alanxtl (via GitHub)" <gi...@apache.org>.
Alanxtl closed pull request #3492: fix: synchronize condition matcher registries
URL: https://github.com/apache/dubbo-go/pull/3492
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] fix: synchronize condition matcher registries [dubbo-go]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #3492:
URL: https://github.com/apache/dubbo-go/pull/3492#issuecomment-4966706463
## [Codecov](https://app.codecov.io/gh/apache/dubbo-go/pull/3492?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `92.30769%` with `2 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 54.51%. Comparing base ([`60d1c2a`](https://app.codecov.io/gh/apache/dubbo-go/commit/60d1c2a949f0ee0da4be3fe09fb79d295491e040?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`ddfa307`](https://app.codecov.io/gh/apache/dubbo-go/commit/ddfa307f8e9f6e7804b68cdc5a12a9e44d02a3f0?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 872 commits behind head on develop.
| [Files with missing lines](https://app.codecov.io/gh/apache/dubbo-go/pull/3492?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [cluster/router/condition/matcher/extension.go](https://app.codecov.io/gh/apache/dubbo-go/pull/3492?src=pr&el=tree&filepath=cluster%2Frouter%2Fcondition%2Fmatcher%2Fextension.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y2x1c3Rlci9yb3V0ZXIvY29uZGl0aW9uL21hdGNoZXIvZXh0ZW5zaW9uLmdv) | 92.30% | [0 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/dubbo-go/pull/3492?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...outer/condition/matcher/pattern\_value/extension.go](https://app.codecov.io/gh/apache/dubbo-go/pull/3492?src=pr&el=tree&filepath=cluster%2Frouter%2Fcondition%2Fmatcher%2Fpattern_value%2Fextension.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y2x1c3Rlci9yb3V0ZXIvY29uZGl0aW9uL21hdGNoZXIvcGF0dGVybl92YWx1ZS9leHRlbnNpb24uZ28=) | 92.30% | [0 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/dubbo-go/pull/3492?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## develop #3492 +/- ##
===========================================
+ Coverage 46.76% 54.51% +7.74%
===========================================
Files 295 462 +167
Lines 17172 35551 +18379
===========================================
+ Hits 8031 19379 +11348
- Misses 8287 14635 +6348
- Partials 854 1537 +683
```
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/dubbo-go/pull/3492?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] fix: synchronize condition matcher registries [dubbo-go]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3492:
URL: https://github.com/apache/dubbo-go/pull/3492#issuecomment-4966643247
## [](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3492) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3492&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3492&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=3492&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3492&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3492&metric=new_duplicated_lines_density&view=list)
<!-- sqra-placement-anchor -->
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3492)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org