swamirishi commented on code in PR #8554:
URL: https://github.com/apache/ozone/pull/8554#discussion_r2144114006
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/service/TestSnapshotDeletingServiceIntegrationTest.java:
##########
Review Comment:
We cannot rename as there is already a Test class with the name
TestSnapshotDeletingService
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/SnapshotDeletingService.java:
##########
@@ -173,12 +154,19 @@ public BackgroundTaskResult call() throws
InterruptedException {
snapInfo.getTableKey());
continue;
}
+ lockIds.clear();
+ lockIds.add(snapInfo.getSnapshotId());
+ if (nextSnapshot != null) {
+ lockIds.add(nextSnapshot.getSnapshotId());
+ }
+ // Acquire write lock on current snapshot and next snapshot in chain.
+ if (!snapshotIdLocks.acquireLock(lockIds).isLockAcquired()) {
+ continue;
+ }
// nextSnapshot = null means entries would be moved to AOS.
if (nextSnapshot == null) {
LOG.info("Snapshot: {} entries will be moved to AOS.",
snapInfo.getTableKey());
- waitForKeyDeletingService();
- waitForDirDeletingService();
} else {
LOG.info("Snapshot: {} entries will be moved to next active
snapshot: {}",
snapInfo.getTableKey(), nextSnapshot.getTableKey());
Review Comment:
done
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]