CAICAIIs opened a new pull request, #1079: URL: https://github.com/apache/incubator-seata-go/pull/1079
<!-- Thanks for sending a pull request! --> <!-- Please make sure you have read and understood the contributing guidelines --> - [x] I have registered the PR [changes](https://github.com/apache/incubator-seata-go/tree/master/changes). **What this PR does**: Fixes a TCC Fence cleanup bug in Go 1.20 where `&identity` inside a `range` loop could enqueue multiple pointers to the same loop variable, causing repeated deletion of the last identity and missing other expired fence logs. This PR updates the enqueue logic to preserve distinct identities and adds a regression test. **Which issue(s) this PR fixes**: TCC Fence cleanup may miss expired fence logs because multiple queued identities can collapse to the last ranged value under Go 1.20 semantics. <!-- *Automatically closes linked issue when PR is merged. Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. _If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_* --> Fixes #1078 **Special notes for your reviewer**: The fix is intentionally minimal and does not change the existing pointer-based queue or batch delete behavior. It only avoids taking the address of the reused `range` variable and adds regression coverage for distinct identities entering and leaving the queue. **Does this PR introduce a user-facing change?**: NONE ```release-note NONE ``` -- 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]
