dubbo icon indicating copy to clipboard operation
dubbo copied to clipboard

[Bug] Unable to perceive the latest subscription services

Open 6Glory9 opened this issue 11 months ago • 4 comments

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 and found no similar issues.

Apache Dubbo Component

Java SDK (apache/dubbo)

Dubbo Version

dubbo 3.2.12

Steps to reproduce this issue

image

  1. Get two instances here, one of which is about to die.
  2. Both instances establish NettyConnectionClient, synchronised connection server appears to wait. At this point one of the instances is offline. The local nacos local cache is already listening for the latest metadata info.
  3. Wait for all the NettyConnectionClient to complete, at which point the subscription relationship is done. Unable to trigger

What you expected to happen

Refreshing the service

Anything else

No response

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

6Glory9 avatar Mar 07 '24 08:03 6Glory9

We need a better way to get and listen service in one time. But maybe nacos not support?

AlbumenJ avatar Mar 08 '24 02:03 AlbumenJ

Maybe we can adjust the order of events, such as registering a listener first and then getting the instance list for notify.

finefuture avatar Mar 08 '24 03:03 finefuture

Maybe we can adjust the order of events, such as registering a listener first and then getting the instance list for notify.

  1. Will zk work as expected?
  2. Will nacos work as expected?

AlbumenJ avatar Mar 11 '24 02:03 AlbumenJ

Maybe we can adjust the order of events, such as registering a listener first and then getting the instance list for notify.

  1. Will zk work as expected?
  2. Will nacos work as expected?

I think this will work, and I am currently drawing this flowchart.

finefuture avatar Mar 12 '24 06:03 finefuture