sarankk commented on code in PR #102:
URL: https://github.com/apache/cassandra-sidecar/pull/102#discussion_r1536075233


##########
src/main/java/org/apache/cassandra/sidecar/routes/sstableuploads/SSTableUploadHandler.java:
##########
@@ -116,10 +119,15 @@ public void handleInternal(RoutingContext context,
         // accept the upload.
         httpRequest.pause();
 
+        InstanceMetrics instanceMetrics = 
metadataFetcher.instance(host).metrics();

Review Comment:
   In that case we can have `instance(host)` unavailable exception. Else we 
will have to do null check everywhere before retrieving metrics



##########
src/main/java/org/apache/cassandra/sidecar/routes/sstableuploads/SSTableUploadHandler.java:
##########
@@ -116,10 +119,15 @@ public void handleInternal(RoutingContext context,
         // accept the upload.
         httpRequest.pause();
 
+        InstanceMetrics instanceMetrics = 
metadataFetcher.instance(host).metrics();

Review Comment:
   In that case we can have `instance(host)` throw unavailable exception. Else 
we will have to do null check everywhere before retrieving metrics



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