rpuch commented on code in PR #7712:
URL: https://github.com/apache/ignite-3/pull/7712#discussion_r2889810814
##########
modules/low-watermark/src/main/java/org/apache/ignite/internal/lowwatermark/LowWatermark.java:
##########
@@ -45,11 +46,22 @@ public interface LowWatermark extends
EventProducer<LowWatermarkEvent, LowWaterm
void getLowWatermarkSafe(Consumer<@Nullable HybridTimestamp> consumer);
/**
- * Updates the low watermark if it is higher than the current one.
+ * Updates the low watermark if it is higher than the current one.
Fire-and-forget version of
+ * {@link #updateLowWatermarkAsync(HybridTimestamp)}.
*
* @param newLowWatermark Candidate for update.
*/
- void updateLowWatermark(HybridTimestamp newLowWatermark);
+ default void updateLowWatermark(HybridTimestamp newLowWatermark) {
+ updateLowWatermarkAsync(newLowWatermark);
+ }
+
+ /**
+ * Updates the low watermark asynchronously if it is higher than the
current one.
+ *
+ * @param newLowWatermark Candidate for update.
+ * @return Future that completes when the low watermark update is finished.
Review Comment:
What happens if no update is needed? Will the future be completed
immediately? I guess yes, but let's state this explicitly
--
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]