frankgh commented on code in PR #66:
URL: https://github.com/apache/cassandra-sidecar/pull/66#discussion_r1303528822


##########
client/src/main/java/org/apache/cassandra/sidecar/client/SidecarClient.java:
##########
@@ -68,6 +70,32 @@ public SidecarClient(SidecarInstancesProvider 
instancesProvider,
         executor = requestExecutor;
     }
 
+    /**
+     * Executes the Sidecar health request using the configured selection 
policy and with no retries
+     *
+     * @return a completable future of the Sidecar health response
+     */
+    public CompletableFuture<HealthResponse> sidecarHealth()
+    {
+        return executor.executeRequestAsync(requestBuilder()
+                .sidecarHealthRequest()
+                .retryPolicy(new NoRetryPolicy())

Review Comment:
   this is not quite what we want. The `NoRetryPolicy` will only check a single 
instance and skip the rest. Ideally, we want to check if any instance is 
available. I think a `BasicRetryPolicy` with some sensible defaults makes sense.



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