smiklosovic commented on a change in pull request #1152:
URL: https://github.com/apache/cassandra/pull/1152#discussion_r697252116
##########
File path: src/java/org/apache/cassandra/hints/HintsService.java
##########
@@ -390,6 +390,23 @@ public Future transferHints(Supplier<UUID> hostIdSupplier)
return dispatchExecutor.transfer(catalog, hostIdSupplier);
}
+ /**
+ * Get the earliest hint written for a particular node,
+ * @param hostID UUID of the node to check it's hints.
+ * @return Earliest hint as per unix time or Long.MIN_VALUE if hostID is
null
+ */
+ public long getEarliestHintForNode(UUID hostID)
+ {
+ if (hostID == null)
+ return Long.MIN_VALUE;
Review comment:
That's not completely true, there is a test called
"WriteCallbackInfoTest" which as a by-product of doing what it does puts null
in there. Without that check, it would throw NPE at some places.
--
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]