HGD-coder opened a new pull request, #3230:
URL: https://github.com/apache/dubbo-go/pull/3230

   ### Description
   This PR fixes a side effect (active count leak) introduced by the 
`BaseInvoker` refactor in #3184.
   
   **Background & Issue:**
   In #3184, `BaseInvoker.GetURL()` was modified to return an `emptyURL` 
instead of `nil` when the invoker is concurrently destroyed. However, in 
`filter/active/filter.go`, if the destruction happens during an ongoing 
invocation, `BeginCount` and `EndCount` will operate on different URL objects 
(the original URL vs. the `emptyURL`). This mismatch causes the active count to 
leak, as the original URL's count is never decremented.
   
   **Solution:**
   To ensure consistency, this PR caches the original URL pointer in the 
`Invocation` attachments during the `Invoke` phase, so `OnResponse` can 
retrieve and use the exact same URL object for `EndCount`.
   
   ### Checklist
   - [x] I confirm the target branch is `develop`
   - [x] Code has passed local testing
   - [x] I have added tests that prove my fix is effective or that my feature 
works


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