AsperforMias opened a new pull request, #146:
URL: https://github.com/apache/dubbo-getty/pull/146

   **What this PR does**:
   
   Fix four data races observed while exercising RPC cancellation and 
connection shutdown:
   
   - Use pointer receivers for connection timeout accessors so they do not copy 
fields updated atomically.
   - Log the session token instead of formatting the entire endpoint during 
shutdown.
   - Synchronize compression configuration updates and snapshot stream 
references before I/O, without holding the configuration lock during blocking 
operations.
   - Publish logger replacements atomically through a consistently typed holder.
   
   Add focused race regressions and update the existing TCP test to read 
compression state through the synchronized accessor.
   
   **Which issue(s) this PR fixes**:
   
   No existing issue is automatically closed. This does not address #145.
   
   **Special notes for your reviewer**:
   
   The patch is based on current master. Validation on the submission tree used 
Go 1.23.12 and golangci-lint v2.4.0: `go test -race ./...`, `go vet ./...`, and 
lint passed; touched files are gofmt-clean. The focused race regressions 
reproduce failures without the fixes.
   
   Compression I/O remains outside the configuration lock. This does not add a 
guarantee that switching compression midway through a live stream is 
protocol-safe, or change the existing writer finalization behavior. The 
connection lifetime issue in #145 and the separate linger-duration issue are 
outside this patch.
   
   `SetLogger(nil)` now leaves the current logger unchanged instead of clearing 
it and causing subsequent logging to panic. The public logger interface is 
unchanged.
   
   **Does this PR introduce a user-facing change?**:
   
   ```release-note
   Fix data races in connection timeout access, shutdown logging, compression 
configuration, and logger replacement. SetLogger(nil) now preserves the current 
logger.
   ```
   


-- 
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