AlexStocks commented on code in PR #1081:
URL: 
https://github.com/apache/incubator-seata-go/pull/1081#discussion_r3001553837


##########
pkg/remoting/loadbalance/consistent_hash_loadbalance_test.go:
##########
@@ -50,3 +59,33 @@ func TestConsistentHashLoadBalance(t *testing.T) {
                return true
        })
 }
+
+func TestConsistentPick_RefreshesClosedSession(t *testing.T) {

Review Comment:
   [P1] 这个 PR 的目标是修 `consistent hash refresh` 的并发问题,但新增测试只覆盖了 closed session 
的单线程刷新路径,还没有覆盖真正的并发 `pick/refreshHashCircle` 场景。这样 race 
修复没有被测试锁住,后面只要有人把同步点再改回去,CI 也发现不了。建议补一个并发用例,至少在多个 goroutine 同时调用 `pick`、并行切换 
session 开关/触发 refresh 的情况下跑 `-race` 能稳定通过。



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to