You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2021/08/27 08:26:37 UTC
[GitHub] [cassandra] smiklosovic commented on a change in pull request #1152: CASSANDRA-14309 Ensure hint window persists restarts
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: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org