Skip to content

HDDS-14387. CLI tool to repair scm deletedBlocksTxn summary counters#9981

Draft
priyeshkaratha wants to merge 1 commit intoapache:masterfrom
priyeshkaratha:HDDS-14387_Approach1
Draft

HDDS-14387. CLI tool to repair scm deletedBlocksTxn summary counters#9981
priyeshkaratha wants to merge 1 commit intoapache:masterfrom
priyeshkaratha:HDDS-14387_Approach1

Conversation

@priyeshkaratha
Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

This pull request improves how administrators manage deleted blocks in Apache Ozone.
It introduces a new command-line tool that helps detect and fix mismatches in the deleted blocks summary. The tool works by taking a snapshot (checkpoint) of the database and comparing the actual deleted blocks with what the system thinks is deleted.
If it finds any differences, it clearly shows them to the user and can also fix the issue with confirmation. This makes it easier to maintain accurate data and improves the reliability of the system.

What is the link to the Apache JIRA

HDDS-14387

How was this patch tested?

Tested using unit test and manually

[root@ccycloud-1.pkaratha.root.comops.site ~]# ozone admin scm deletedBlocksTxn summary --detail
Taking RocksDB checkpoint and scanning deletedBlocks table ...

=== DeletedBlocksTransaction Checkpoint Comparison ===
Metric                                Checkpoint Actual   Checkpoint Persisted
Total transactions                    0                   0                 
Total blocks                          0                   0                 
Total Block size (bytes)              0                   0                 
Total Replicated size (bytes)         0                   0                 
[root@ccycloud-1.pkaratha.root.comops.site ~]# ozone admin scm deletedBlocksTxn summary --repair
Taking RocksDB checkpoint and scanning deletedBlocks table ...

=== DeletedBlocksTransaction Checkpoint Comparison ===
Metric                                Checkpoint Actual   Checkpoint Persisted
Total transactions                    0                   0                 
Total blocks                          0                   0                 
Total Block size (bytes)              0                   0                 
Total Replicated size (bytes)         0                   0                 

Checkpoint is consistent and nothing to repair.

[root@ccycloud-1.pkaratha.root.comops.site ~]# ozone admin scm deletedBlocksTxn summary
DeletedBlocksTransaction summary:
Total number of transactions: 0
Total number of blocks: 0
Total size of blocks: 0
Total replicated size of blocks: 0

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.

1 participant