Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDDS-12050. Implement TransactionInfoRepair command for SCM #7689

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

sarvekshayr
Copy link
Contributor

What changes were proposed in this pull request?

ozone repair scm update-transaction
A port of the existing ozone repair om update-transaction for SCM.

What is the link to the Apache JIRA

HDDS-12050

How was this patch tested?

Tested the patch on a docker cluster.

bash-5.1$ ozone repair scm
Missing required subcommand
Usage: ozone repair scm [COMMAND]
Operational tool to repair SCM.
Commands:
  cert                Subcommand for all certificate related repairs on SCM
  update-transaction  CLI to update the highest index in scmTransactionInfos
                        table.
bash-5.1$ ozone repair scm update-transaction --db /data/metadata/scm.db --term 2 --index 2
ATTENTION: Running as user hadoop. Make sure this is the same user used to run the Ozone process. Are you sure you want to continue (y/N)? y
Run as user: hadoop
Error: SCM is currently running on this host with PID 7. Stop the service before running the repair tool.

@adoroszlai adoroszlai added the tools Tools that helps with debugging label Jan 13, 2025
Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sarvekshayr for the patch.

I would like to avoid copying logic for SCM's version of the tool. Here's my attempt to reduce duplication: adoroszlai@29fd408, which results in smaller diff: master...adoroszlai:ozone:HDDS-12050

@sarvekshayr
Copy link
Contributor Author

I would like to avoid copying logic for SCM's version of the tool. Here's my attempt to reduce duplication: adoroszlai@29fd408, which results in smaller diff: master...adoroszlai:ozone:HDDS-12050

Thank you @adoroszlai. The change proposed is simpler, reduces duplication and the patch looks good overall.
We can commit the change.

@adoroszlai
Copy link
Contributor

The change proposed is simpler, reduces duplication and the patch looks good overall. We can commit the change.

Thanks, I've added my commits to this PR.

@adoroszlai adoroszlai requested a review from errose28 January 13, 2025 11:35
@adoroszlai
Copy link
Contributor

@errose28 could you please review?

@adoroszlai
Copy link
Contributor

@nandakumar131 please review if you have some time

Copy link
Contributor

@Tejaskriya Tejaskriya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this @sarvekshayr , Could we add a test under the integration test TestOzoneRepairShell for testing scm component as well? (there is testUpdateTransactionInfoTable testing for om already)

@sarvekshayr
Copy link
Contributor Author

Thanks for working on this @sarvekshayr , Could we add a test under the integration test TestOzoneRepairShell for testing scm component as well? (there is testUpdateTransactionInfoTable testing for om already)

Sure, I'll modify it to test scm component as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tools Tools that helps with debugging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants