You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "jk-tonycui (via GitHub)" <gi...@apache.org> on 2026/03/13 08:09:40 UTC

[I] [Bug] The traffic will be routed to instances of previous interface, which causes no such method error [dubbo]

jk-tonycui opened a new issue, #16131:
URL: https://github.com/apache/dubbo/issues/16131

   ### Pre-check
   
   - [x] I am sure that all the content I provide is in English.
   
   
   ### Search before asking
   
   - [x] I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Apache Dubbo Component
   
   Java SDK (apache/dubbo)
   
   ### Dubbo Version
   
   Dubbo 3.3.6, JDK 1.8
   
   ### Steps to reproduce this issue
   
   Prepare two interfaces in different application, and invoke the interfaces one by one. The invocation of second interface will have no such method error.
   
   ### What you expected to happen
   
   The traffic should be always go to correct instances.
   
   ### Anything else
   
   After debugging, the issue is at the lines below in `AbstractDirectory`
   ```
   /**
        * All invokers from registry
        */
       private volatile BitList<Invoker<T>> invokers = BitList.emptyList();
   ```
   
   The invokes are initiated by `BitList.emptyList()`, and the `emptyList()` returns a variable of empty list. However, the `invokers` variable get the reference of `emptyList`, and changes happens in the first invocation of the first interface. When the second interface is invoked, the invokes are not empty, but the instances of the previous instances of the first interface.
   
   
   ### Do you have a (mini) reproduction demo?
   
   - [ ] Yes, I have a minimal reproduction demo to help resolve this issue more effectively!
   
   ### Are you willing to submit a pull request to fix on your own?
   
   - [x] Yes I am willing to submit a pull request on my own!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: notifications-unsubscribe@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] [Bug] The traffic will be routed to instances of previous interface, which causes no such method error [dubbo]

Posted by "jk-tonycui (via GitHub)" <gi...@apache.org>.
jk-tonycui commented on issue #16131:
URL: https://github.com/apache/dubbo/issues/16131#issuecomment-4072006951

   Since the purpose of `BitList.emptyList()` function is to create a empty list especially for initiation and error handling. I would like to propose to construct a new BitList Object as the implematation of `BitList.emptyList()` function. What do you think about this idea? @zrlw 


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] [Bug] The traffic will be routed to instances of previous interface, which causes no such method error [dubbo]

Posted by "RainYuY (via GitHub)" <gi...@apache.org>.
RainYuY commented on issue #16131:
URL: https://github.com/apache/dubbo/issues/16131#issuecomment-4125654153

   I don't think it's a good idea. Are there any real-world usage scenarios where this problem would occur?
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org