AlexStocks commented on code in PR #3592:
URL: https://github.com/apache/dubbo-go/pull/3592#discussion_r3841254063


##########
remoting/getty/getty_client.go:
##########
@@ -287,10 +282,12 @@ func (c *Client) transfer(session getty.Session, request 
*remoting.Request, time
        return totalLen, sendLen, perrors.WithStack(err)
 }
 
-func (c *Client) resetRpcConn() {
+func (c *Client) resetRpcConn(expected *gettyRPCClient) {
        c.gettyClientMux.Lock()
+       defer c.gettyClientMux.Unlock()
+       if c.gettyClient != expected {

Review Comment:
   [P1] 当前 rebase 后,这个回归测试又失去了你在 r3840450634 描述的锁 barrier:Head `6eb2c52d` 的 
`TestRequestTimeoutConcurrentWithClose` 在 `WritePkg` 后直接启动 `Close`,没有先持有 
`gettyClientMux`,也没有断言 Close 在释放锁前必须阻塞。我针对当前 Head 再做了一次 mutant,只删除 Base 中 
`Close` 的 `gettyClientMux.Lock/Unlock`,执行 `go test -race ./remoting/getty -run 
'^TestRequestTimeoutConcurrentWithClose$' -count=50` 仍全部通过;当前 5 个 focused 测试 
`-race -count=20` 也全绿。请把确定性 barrier 恢复到当前 Diff 的测试中,并确认这个错误锁域 mutant 稳定失败;否则 
rebase 后仍没有自动化门禁保护原 data 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