smiklosovic commented on a change in pull request #1232:
URL: https://github.com/apache/cassandra/pull/1232#discussion_r724052157



##########
File path: src/java/org/apache/cassandra/hints/HintsDispatchExecutor.java
##########
@@ -275,23 +275,40 @@ private boolean deliver(HintsDescriptor descriptor, 
InetAddressAndPort address)
                 if (offset != null)
                     dispatcher.seek(offset);
 
-                if (dispatcher.dispatch())
+                try
                 {
-                    store.delete(descriptor);
-                    store.cleanUp(descriptor);
-                    logger.info("Finished hinted handoff of file {} to 
endpoint {}: {}", descriptor.fileName(), address, hostId);
-                    return true;
+                    boolean dispatchResult = dispatcher.dispatch();

Review comment:
       I would rename this to "dispatchSuccessful". It does not make a lot of 
sense to ask "if dispatchResult then" on the next line. Also I would not place 
"return true / false" in both branches, you can just return 
"dispatchSuccessful" after whole if / else block.




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