rpuch commented on code in PR #1976:
URL: https://github.com/apache/ignite-3/pull/1976#discussion_r1180335501


##########
modules/storage-api/src/main/java/org/apache/ignite/internal/storage/MvPartitionStorage.java:
##########
@@ -226,8 +273,32 @@ public interface MvPartitionStorage extends 
ManuallyCloseable {
      *      {@code null} if there's no such value.
      * @throws StorageException If failed to poll element for vacuum.
      */
+    //TODO IGNITE-19367 Remove this method and replace its usages with proper 
batch removes.
+    @Deprecated
     default @Nullable BinaryRowAndRowId pollForVacuum(HybridTimestamp 
lowWatermark) {
-        throw new UnsupportedOperationException("pollForVacuum");
+        while (true) {
+            BinaryRowAndRowId binaryRowAndRowId = runConsistently(locker -> {
+                GcEntry gcEntry = peek(lowWatermark);
+
+                if (gcEntry == null) {
+                    return null;
+                }
+
+                locker.lock(gcEntry.getRowId());

Review Comment:
   How about adding a TODO? It seems really easy to forget to change lock() to 
tryLock() after the change is implemented



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

Reply via email to