trpc-group / trpc-go

A pluggable, high-performance RPC framework written in golang
Other
742 stars 85 forks source link

client: remove the write operation on *registry.Node in LoadNodeConfig to avoid data race during selecting Node #138

Closed liuzengh closed 7 months ago

liuzengh commented 7 months ago

cherry-pick from internal code within the company

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (cf5ca25) 85.80909% compared to head (a7a6ef1) 85.72580%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #138 +/- ## =================================================== - Coverage 85.80909% 85.72580% -0.08329% =================================================== Files 189 189 Lines 16123 16127 +4 =================================================== - Hits 13835 13825 -10 - Misses 1736 1740 +4 - Partials 552 562 +10 ``` | [Flag](https://app.codecov.io/gh/trpc-group/trpc-go/pull/138/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trpc-group) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/trpc-group/trpc-go/pull/138/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trpc-group) | `85.72580% <100.00000%> (-0.08329%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trpc-group#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/trpc-group/trpc-go/pull/138?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trpc-group) | Coverage Δ | | |---|---|---| | [client/client.go](https://app.codecov.io/gh/trpc-group/trpc-go/pull/138?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trpc-group#diff-Y2xpZW50L2NsaWVudC5nbw==) | `86.62791% <100.00000%> (ø)` | | | [client/options.go](https://app.codecov.io/gh/trpc-group/trpc-go/pull/138?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trpc-group#diff-Y2xpZW50L29wdGlvbnMuZ28=) | `88.38527% <ø> (-0.06543%)` | :arrow_down: | | [client/stream.go](https://app.codecov.io/gh/trpc-group/trpc-go/pull/138?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trpc-group#diff-Y2xpZW50L3N0cmVhbS5nbw==) | `77.90698% <100.00000%> (+1.65698%)` | :arrow_up: | ... and [6 files with indirect coverage changes](https://app.codecov.io/gh/trpc-group/trpc-go/pull/138/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trpc-group)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.