skoppu22 commented on code in PR #340:
URL: https://github.com/apache/cassandra-sidecar/pull/340#discussion_r3161977829


##########
server/src/main/java/org/apache/cassandra/sidecar/modules/ConfigurationModule.java:
##########
@@ -126,6 +132,25 @@ CQLSessionProvider cqlSessionProvider(Vertx vertx,
         return cqlSessionProvider;
     }
 
+    @Provides
+    @Singleton
+    DriverUnsupportedSchemaCache driverUnsupportedSchemaCache(Vertx vertx,
+                                                              
SidecarConfiguration sidecarConfiguration,
+                                                              
CQLSessionProvider cqlSessionProvider)
+    {
+        DriverUnsupportedSchemaCache schemaCache = new 
DriverUnsupportedSchemaCache(sidecarConfiguration, cqlSessionProvider);
+        // trigger immediate cache population once Sidecar connects to 
Cassandra node
+        vertx.eventBus().localConsumer(ON_CASSANDRA_CQL_READY.address(), 
message -> schemaCache.refresh(true));

Review Comment:
   This will block event loop. Some other consumers of ON_CASSANDRA_CQL_READY 
are using EventBusUtils.onceLocalConsumer + PeriodicTaskExecutor.schedule() 
pattern to avoid blocking



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