SammyVimes commented on code in PR #1716:
URL: https://github.com/apache/ignite-3/pull/1716#discussion_r1119672321
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/StorageUpdateHandler.java:
##########
@@ -150,6 +224,26 @@ public void handleUpdateAll(
});
}
+ private void executeBatchGc(@Nullable HybridTimestamp newLwm) {
+ if (newLwm != null) {
+ @Nullable HybridTimestamp oldLwm;
+ do {
+ oldLwm = lastRecordedLwm.get();
+
+ if (oldLwm != null && newLwm.compareTo(oldLwm) <= 0) {
+ break;
+ }
+ } while (!lastRecordedLwm.compareAndSet(oldLwm, newLwm));
+
+ if (oldLwm == null || newLwm.compareTo(oldLwm) > 0) {
+ // Iff the lwm we have is the new lwm.
+ // Otherwise our newLwm is either was smaller than last
recorded lwm or last recorded lwm has changed
+ // concurrently and it become greater. If that's the case,
another thread will perform the GC.
+ vacuumBatch(newLwm, gcOnUpdateBatchSize);
Review Comment:
Yes, it is noted in the comment
--
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]