imbajin commented on code in PR #3157:
URL: https://github.com/apache/hugegraph/pull/3157#discussion_r4041001779


##########
hugegraph-pd/hg-pd-client/src/main/java/org/apache/hugegraph/pd/client/AbstractClient.java:
##########
@@ -98,79 +104,154 @@ public static <T extends AbstractStub> T setAsyncParams(T 
stub, PDConfig config)
                                new Authentication(config.getUserName(), 
config.getAuthority()));
     }
 
-    protected AbstractBlockingStub getBlockingStub() throws PDException {
+    protected synchronized AbstractBlockingStub getBlockingStub() throws 
PDException {

Review Comment:
   The getter-only fix is insufficient: once resetStub() closes the shared 
channel, the base unary retry path also waits on the monitor. However, the new 
watch-triggered rotation adds a real tradeoff: an old leader can still forward 
unary RPCs to the new leader (KvServiceGrpcImpl.get), while watch reconnect 
closes that usable channel and may next probe an unresponsive peer. Unary 
traffic then waits for discovery. Keeping this open as a shared-transport 
availability discussion; preserving a usable unary channel during watch 
discovery needs a broader lifecycle decision, not just an unlocked getter.



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