tkalkirill commented on code in PR #1280:
URL: https://github.com/apache/ignite-3/pull/1280#discussion_r1011253470
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/raft/snapshot/outgoing/SnapshotAwarePartitionDataStorage.java:
##########
@@ -123,11 +127,21 @@ private void handleSnapshotInterference(RowId rowId) {
@Override
public void close() throws Exception {
- // TODO: IGNITE-17935 - terminate all snapshots of this partition
considering correct locking to do it consistently
+ cleanupSnapshots();
partitionStorage.close();
}
+ private void cleanupSnapshots() {
+ PartitionSnapshots partitionSnapshots = getPartitionSnapshots();
+
+ try (AutoLockup ignored = partitionSnapshots.acquireReadLock()) {
Review Comment:
I don’t understand a bit, the variable is called “not used”, but in fact it
is used, it does not make it clear, reading the code I think if it is not used
then the code is not needed and would have been deleted.
--
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]