HDDS-15474. Drop redundant TestOmSnapshot linked-bucket subclasses#10432
Merged
Conversation
adoroszlai
approved these changes
Jun 4, 2026
Contributor
|
@sadanand48 @smengcl would you like to take a look? |
Contributor
|
Thanks @chihsuan for the patch. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This change is related to HDDS-9000, which aims to improve the speed of unit and integration tests.
TestOmSnapshotis one of the slowest tests. It's an abstract suite of ~72 tests. Each concrete subclass re-runs the whole suite on its ownMiniOzoneCluster. There are currently 8 such combinations, 4 of which are linked-bucket variants added by HDDS-11705 (#7434) to verify that snapshot operations on a linked bucket act on the source bucket.That fix works by resolving the bucket link once, up front, at every snapshot entry point, before any layout-specific (
isFileSystemOptimized()) or native-lib logic runs. So a linked run exercises exactly the same downstream code as a plain run, plus the same single resolution step. Repeating it for every layout and native setting re-proves the same behaviour and adds no coverage, while costing 3 extra fullMiniOzoneClustersuite runs.This PR deletes the three redundant linked wrappers:
TestOmSnapshotObjectStoreWithLinkedBucketsTestOmSnapshotFsoWithNativeLibWithLinkedBucketsTestOmSnapshotWithBucketLinkingLegacyand keep
TestOmSnapshotFsoWithoutNativeLibWithLinkedBucketsas the surviving full linked run (native-off, so it runs both in CI and locally; native-on classes self-skip without the RocksDB native lib). The four plain classes are unchanged.No test method is removed; the matrix shrinks from 8 to 5 combinations, saving ~12 min of CI wall clock in the snapshot job (measured below).
How coverage is preserved
The link-resolution contract stays covered twice over: the surviving linked class still runs the entire suite through linked buckets, and
TestOMSnapshotCreateRequest/TestOMSnapshotDeleteRequest/TestOMSnapshotRenameRequestassert at unit level thatpreExecute()rewrites the request to the resolved bucket. Per-layout diff output remains covered by the four plain classes.Tradeoff: OBJECT_STORE and LEGACY no longer run through linked buckets; FSO carries the linked coverage alone. If per-layout linked coverage is preferred, keeping one linked class per layout is a simple alternative.
Per-operation link resolution sites (why linked runs are layout/native independent)
OMSnapshotCreateRequest.preExecute()OMSnapshotDeleteRequest.preExecute()OMSnapshotRenameRequest.preExecute()OzoneManager.listSnapshot()OzoneManager.getSnapshotInfo()OzoneManager.snapshotDiff()/submitSnapshotDiff()OzoneManager.cancelSnapshotDiff()OzoneManager.listSnapshotDiffJobs().snapshot/<name>OmSnapshotManager.getActiveFsMetadataOrSnapshot()Not touched: the
OmSnapshotFileSystem*WithLinkedBucketsclasses inSnapshotTests(a separate base,TestOmSnapshotFileSystem). Follow-up to HDDS-10308, but independent of it (disjoint files).What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-15474
How was this patch tested?
Test-only change (deletes three config-wrapper classes, adds nothing).
hadoop-ozone/integration-testcompiles after the deletions; no remaining references to the deleted classes.Tests run: 72, Failures: 0, Errors: 0, Skipped: 0(438s), the same test count as before, confirming linked coverage is intact.build-branchrun):integration (snapshot)passed in 35m46s (2146s) vs 47m41s (2861s) for the same job on the same day's master run, ~12 min (~25%) faster. All 5 surviving classes green with the expected skip pattern (12 layout-guarded skips on OBJECT_STORE/LEGACY, 0 on FSO); theTestOmSnapshotmatrix dropped from ~2046.8s (8 classes) to 1309.7s (5 classes).