Skip to content

HDDS-14829. Split snapshot diff job into separate rpc calls for submitting job and getting the report.#9985

Draft
SaketaChalamchala wants to merge 1 commit intoapache:masterfrom
SaketaChalamchala:HDDS-14829
Draft

HDDS-14829. Split snapshot diff job into separate rpc calls for submitting job and getting the report.#9985
SaketaChalamchala wants to merge 1 commit intoapache:masterfrom
SaketaChalamchala:HDDS-14829

Conversation

@SaketaChalamchala
Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Currently, the snapshot diff process ties snapshot diff job cleanup with re-submission i.e., new snapshot diff cannot be submitted until old snapshot diff job is cleaned up from the DB as there is a single rpc call used for submitting snap diff and gettng the report. Hence, the cleanup has to be inline with the default wait time (1m) because,

  • CLI requests are asked to wait default wait time to retrieve the report/status of the job.
  • If cleanup runs at T0, T1 and so on... snapshot diff job that is submitted at T0.5 which fails immediately is cleaned up from the DB at T1.
    -- When the user tries to get the report/status at T1.5 they do not know about the failure and just resubmit.
    -- This will continue to go on at T2.5 and so on...

The proposal is to refactor the snapshot diff workflow by splitting the process into two distinct RPC calls and removing the dependency between cleanup and submission:

  • Submit Job: Initiates the snapshot diff job and returns immediately with a status.
  • Get Report: A separate call to retrieve the results once the job is complete.

RPC Layer: Updated the Ozone Manager protocol to support separate submitSnapshotDiff and getSnapshotDiffReport requests.
Client Side: Updated the ozone sh snapshot diff command to handle the new asynchronous flow. It now submits the job and provides instructions to the user on how to poll for the report using the --get-report option.
Response Handling: Introduced SubmitSnapshotDiffResponse to provide clear feedback to the user regarding the job status (e.g., if a job is already in progress, completed, or newly submitted).

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-14829

How was this patch tested?

Acceptance tests and Unit tests to be added.

@errose28 errose28 added the snapshot https://issues.apache.org/jira/browse/HDDS-6517 label Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

snapshot https://issues.apache.org/jira/browse/HDDS-6517

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants