Skip to content

HDDS-15474. Drop redundant TestOmSnapshot linked-bucket subclasses#10432

Merged
adoroszlai merged 1 commit into
apache:masterfrom
chihsuan:HDDS-15474
Jun 5, 2026
Merged

HDDS-15474. Drop redundant TestOmSnapshot linked-bucket subclasses#10432
adoroszlai merged 1 commit into
apache:masterfrom
chihsuan:HDDS-15474

Conversation

@chihsuan
Copy link
Copy Markdown
Contributor

@chihsuan chihsuan commented Jun 4, 2026

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.

TestOmSnapshot is one of the slowest tests. It's an abstract suite of ~72 tests. Each concrete subclass re-runs the whole suite on its own MiniOzoneCluster. 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 full MiniOzoneCluster suite runs.

This PR deletes the three redundant linked wrappers:

  • TestOmSnapshotObjectStoreWithLinkedBuckets
  • TestOmSnapshotFsoWithNativeLibWithLinkedBuckets
  • TestOmSnapshotWithBucketLinkingLegacy

and keep TestOmSnapshotFsoWithoutNativeLibWithLinkedBuckets as 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 / TestOMSnapshotRenameRequest assert at unit level that preExecute() 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)
Operation Resolution site
createSnapshot OMSnapshotCreateRequest.preExecute()
deleteSnapshot OMSnapshotDeleteRequest.preExecute()
renameSnapshot OMSnapshotRenameRequest.preExecute()
listSnapshot OzoneManager.listSnapshot()
getSnapshotInfo OzoneManager.getSnapshotInfo()
snapshotDiff / submitSnapshotDiff OzoneManager.snapshotDiff() / submitSnapshotDiff()
cancelSnapshotDiff OzoneManager.cancelSnapshotDiff()
listSnapshotDiffJobs OzoneManager.listSnapshotDiffJobs()
read key via .snapshot/<name> OmSnapshotManager.getActiveFsMetadataOrSnapshot()

Not touched: the OmSnapshotFileSystem*WithLinkedBuckets classes in SnapshotTests (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-test compiles after the deletions; no remaining references to the deleted classes.
  • The surviving linked class passes locally after the change: Tests run: 72, Failures: 0, Errors: 0, Skipped: 0 (438s), the same test count as before, confirming linked coverage is intact.
  • CI (fork build-branch run): 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); the TestOmSnapshot matrix dropped from ~2046.8s (8 classes) to 1309.7s (5 classes).

@chihsuan chihsuan marked this pull request as ready for review June 4, 2026 12:28
@adoroszlai
Copy link
Copy Markdown
Contributor

@sadanand48 @smengcl would you like to take a look?

@adoroszlai adoroszlai added the test label Jun 4, 2026
@adoroszlai adoroszlai merged commit 666ed2f into apache:master Jun 5, 2026
51 of 53 checks passed
@adoroszlai
Copy link
Copy Markdown
Contributor

Thanks @chihsuan for the patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants