You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "swamirishi (via GitHub)" <gi...@apache.org> on 2025/06/12 09:40:56 UTC
[PR] HDDS-13244. Fix TestSnapshotDeletingServiceIntegrationTest should close open snapshots after deleting snapshot [ozone]
swamirishi opened a new pull request, #8611:
URL: https://github.com/apache/ozone/pull/8611
## What changes were proposed in this pull request?
Currently OmSnapshotPurgeResponse acquires a write lock SNAPSHOT_DB_LOCK while deleting the directory. This lock is acquired to avoid race condition with SstFilteringService. If there are threads which have opened a snapshot which inturn acquires a readlock on a snapshot this doesn't let the transactions get flushed. In this test case we have a deleted snapshot which is not closing the referenceCounted info in snapshot. PurgeRequest would be eventually changed to acquire a SNAPSHOT_META_LOCK by @smengcl 's patch https://github.com/apache/ozone/pull/8555.
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-13244
## How was this patch tested?
Fixed failing unit test
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13244. Fix TestSnapshotDeletingServiceIntegrationTest should close open snapshots after deleting snapshot [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on code in PR #8611:
URL: https://github.com/apache/ozone/pull/8611#discussion_r2142243063
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotDeletingServiceIntegrationTest.java:
##########
@@ -414,7 +422,7 @@ public void testSnapshotWithFSO() throws Exception {
client.getObjectStore().deleteSnapshot(VOLUME_NAME, BUCKET_NAME_FSO,
"snap2");
-
+ rcSnap2.close();
Review Comment:
Why do we need to close this and `rcSnap3` explicitly?
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotDeletingServiceIntegrationTest.java:
##########
@@ -115,6 +115,7 @@ public class TestSnapshotDeletingServiceIntegrationTest {
private static final String BUCKET_NAME_ONE = "bucket1";
private static final String BUCKET_NAME_TWO = "bucket2";
private static final String BUCKET_NAME_FSO = "bucketfso";
+ private static final Stack<UncheckedAutoCloseableSupplier<OmSnapshot>> RC_SNAPS = new Stack<>();
Review Comment:
- should not be `static`
- prefer `Deque` over `Stack` (which `extends Vector`)
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13244. Fix TestSnapshotDeletingServiceIntegrationTest should close open snapshots after deleting snapshot [ozone]
Posted by "swamirishi (via GitHub)" <gi...@apache.org>.
swamirishi commented on code in PR #8611:
URL: https://github.com/apache/ozone/pull/8611#discussion_r2142856365
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotDeletingServiceIntegrationTest.java:
##########
@@ -115,6 +115,7 @@ public class TestSnapshotDeletingServiceIntegrationTest {
private static final String BUCKET_NAME_ONE = "bucket1";
private static final String BUCKET_NAME_TWO = "bucket2";
private static final String BUCKET_NAME_FSO = "bucketfso";
+ private static final Stack<UncheckedAutoCloseableSupplier<OmSnapshot>> RC_SNAPS = new Stack<>();
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13244. Fix TestSnapshotDeletingServiceIntegrationTest should close open snapshots after deleting snapshot [ozone]
Posted by "swamirishi (via GitHub)" <gi...@apache.org>.
swamirishi commented on code in PR #8611:
URL: https://github.com/apache/ozone/pull/8611#discussion_r2142817408
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotDeletingServiceIntegrationTest.java:
##########
@@ -414,7 +422,7 @@ public void testSnapshotWithFSO() throws Exception {
client.getObjectStore().deleteSnapshot(VOLUME_NAME, BUCKET_NAME_FSO,
"snap2");
-
+ rcSnap2.close();
Review Comment:
For the snapshot to get purged we have to get write lock. OmSnapshotManager.get() acquires a read lock. So here we need to explicitly close references for it to get purged.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13244. TestSnapshotDeletingServiceIntegrationTest should close snapshots after deleting them [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai merged PR #8611:
URL: https://github.com/apache/ozone/pull/8611
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13244. TestSnapshotDeletingServiceIntegrationTest should close snapshots after deleting them [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #8611:
URL: https://github.com/apache/ozone/pull/8611#issuecomment-2967574163
Thanks @swamirishi for the fix.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org