ritegarg commented on code in PR #2479:
URL: https://github.com/apache/phoenix/pull/2479#discussion_r3291073717


##########
phoenix-core-client/src/main/java/org/apache/phoenix/jdbc/HAGroupStoreClient.java:
##########
@@ -886,9 +913,16 @@ private PathChildrenCacheListener 
createCacheListener(CountDownLatch latch,
             if (cacheType == ClusterType.LOCAL) {
               maybeInitializePeerPathChildrenCache();
             }
+            // Offload the legacy CRR sync (it does ZK + JDBC I/O) so we don't 
block
+            // Curator's per-namespace event dispatcher.
+            ScheduledExecutorService syncExec = legacyCrrSyncExecutor;
+            if (syncExec != null) {
+              syncExec.execute(this::syncLegacyCRRIfRoleChanged);

Review Comment:
   Agreed — close() shuts the executor down without coordinating with Curator's 
event thread, so an in-flight listener can race. Will wrap the 
syncExec.execute(...) in a try/catch (RejectedExecutionException) that no-ops 
at DEBUG level during shutdown.



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

Reply via email to