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
Draft
Conversation
…tting job and getting the report.
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?
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,
-- 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:
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.