Skip to content

Add DeleteRamp to MigrationConfig for independent delete ramp control - #3273

Draft
beijxu wants to merge 1 commit into
linkedin:masterfrom
beijxu:bexu-linkedin-add-delete-ramp-to-migration-config
Draft

Add DeleteRamp to MigrationConfig for independent delete ramp control#3273
beijxu wants to merge 1 commit into
linkedin:masterfrom
beijxu:bexu-linkedin-add-delete-ramp-to-migration-config

Conversation

@beijxu

@beijxu beijxu commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Add a new DeleteRamp inner class to MigrationConfig, decoupling delete operations from the existing WriteRamp. This allows independent ramp control for deletes during storage backend migration.

Changes

  • Added DeleteRamp class with fields: forceDisableDualDelete, dualDeleteAsyncPct, dualDeleteSyncPctNonStrict, dualDeleteSyncPctStrict, deleteOnlyToSecondary
  • Added deleteRamp field to MigrationConfig (nullable, defaults to null)
  • Preserved 4-arg constructor for backward compatibility with existing callers
  • @JsonIgnoreProperties(ignoreUnknown = true) on DeleteRamp for forward compatibility

Backward Compatibility

  • Old JSON without deleteRamp deserializes successfully (getDeleteRamp() returns null)
  • Old code without DeleteRamp ignores the new field via @JsonIgnoreProperties(ignoreUnknown = true) on MigrationConfig
  • Existing 4-arg MigrationConfig constructor still works (delegates with deleteRamp=null)

Testing Done

  • MigrationConfigTest: constructor, serialization round-trip, unknown field tolerance, backward-compat deserialization without deleteRamp, equals/hashCode, default constructor, 4-arg constructor compat
  • BackwardsCompatibilityTest: updated field set expectations, added snapshot-without-deleteRamp test, all existing snapshot tests pass unchanged

Add a new DeleteRamp inner class to MigrationConfig, decoupling delete
operations from the existing WriteRamp. This allows independent ramp
control for deletes during storage backend migration.

DeleteRamp fields mirror WriteRamp's delete-related pattern:
- forceDisableDualDelete
- dualDeleteAsyncPct
- dualDeleteSyncPctNonStrict
- dualDeleteSyncPctStrict
- deleteOnlyToSecondary

Backward compatibility:
- The field defaults to null when absent from JSON (existing configs)
- A 4-arg MigrationConfig constructor is preserved for existing callers
- @JsonIgnoreProperties(ignoreUnknown = true) ensures forward compat

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@codecov-commenter

codecov-commenter commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 37 lines in your changes missing coverage. Please review.
✅ Project coverage is 38.12%. Comparing base (52ba813) to head (b0e750c).
⚠️ Report is 406 commits behind head on master.

Files with missing lines Patch % Lines
...java/com/github/ambry/account/MigrationConfig.java 0.00% 37 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (52ba813) and HEAD (b0e750c). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (52ba813) HEAD (b0e750c)
3 2
Additional details and impacted files
@@              Coverage Diff              @@
##             master    #3273       +/-   ##
=============================================
- Coverage     64.24%   38.12%   -26.12%     
+ Complexity    10398     6463     -3935     
=============================================
  Files           840      938       +98     
  Lines         71755    80355     +8600     
  Branches       8611     9671     +1060     
=============================================
- Hits          46099    30639    -15460     
- Misses        23004    47225    +24221     
+ Partials       2652     2491      -161     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants