DAOS-17321 ddb: Add checksum check command to ddb GO code - #18943
Draft
knard38 wants to merge 1 commit into
Draft
Conversation
|
Ticket title is 'Checksum management with ddb' |
Adds the Go-side command/flag definitions and cgo wrapper so csum_check is available from the ddb binary, wired to ddb_run_csum_check() from patch-007: - ddb_commands.go: registers the csum_check command (required `path` positional, `-e/--epoch` default EPOCH_MAX, `-v/--verbose`). - commands_wrapper.go: CsumCheck() on DdbContext builds the C csum_check_options struct and calls through to ddb_run_csum_check(). - libddb.go / libddb_stubs.go: real + stub ddb_run_csum_check() wrappers, following the existing per-command _RC/_Fn hook pattern so csum_check can be unit tested without a live VOS environment. - ddb_commands_test.go: help text, missing/invalid argument handling, default/short/long epoch forms, and verbose short/long forms. Also documents the new command (and the previously undocumented csum_dump) in the ddb command reference (README.md). This is patch 3/3 of the DAOS-17321 csum_check split (supersedes PR #18940): see patch-006 for the ddb_vos dv_check_csum() API and patch-007 for the ddb C command wiring. This completes the user-facing `ddb csum_check` feature. Signed-off-by: Cedric Koch-Hofer <cedric.koch-hofer@hpe.com>
knard38
force-pushed
the
ckochhof/dev/master/daos-17321/patch-008
branch
from
August 26, 2026 19:23
cfe97a1 to
2ab1f05
Compare
Collaborator
|
Test stage Functional on EL 9 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-18943/1/execution/node/1233/log |
6 tasks
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.
Third and final patch in the 3-way split of #18940 ("DAOS-17321 ddb: add csum_check command to verify data checksums"):
dv_check_csum()to the ddb VOS API (ddb_vos.c/ddb_vos.h), with unit tests.ddb_run_csum_check()ddb C command on top ofdv_check_csum(), with unit tests.ddb_run_csum_check()through to the ddb Go CLI as thecsum_checkcommand, with Go unit tests, and documents it (plus the previously undocumentedcsum_dump) inREADME.md.Supersedes #18940. Mirrors the layering used for the sibling
csum_dumpcommand (#18685 in that earlier series), including the current build-tag CGo stub architecture (libddb.go/libddb_stubs.go, per-commandddb_run_<cmd>_Fnhooks) introduced by #18124. This patch completes the user-facing feature: after this lands,ddb csum_checkis available from the shipped binary exactly as described in #18940.Changes
csum_checkcommand (ddb_commands.go)Registers the command with:
path(required positional) — VOS tree path to check (must be complete: including the akey, and the extent for an array value).-e, --epoch(defaultEPOCH_MAX) — for a single value akey, the epoch at or before which the value is fetched; for an array akey, the maximal epoch of the visible record extent(s) to select.-v, --verbose(defaultfalse) — print every checksum entry (matching, no-checksum, or corrupted), not just corrupted ones, plus a final summary line even on success.CsumCheck()onDdbContext(commands_wrapper.go)Builds the C
csum_check_optionsstruct (path, epoch, verbose) and calls through toddb_run_csum_check().Real + stub
ddb_run_csum_check()wrappers (libddb.go,libddb_stubs.go)Follow the existing per-command
_RC/_Fnhook pattern, socsum_checkcan be unit tested without a live VOS environment.Tests (
ddb_commands_test.go)TestDdb_Cmds: missing requiredpathargument, an invalid flag, the default epoch (EPOCH_MAX)/verbose (false), short-e/-vand long--epoch=/--verboseforms (individually and combined).TestDdb_HelpCmds:csum_check'sUsage:line, matching the existing convention used for every other command's help test.Documentation (
README.md)Adds
csum_checkto the command reference table, alongsidecsum_dump(which had not yet been documented there).Steps for the author:
After all prior steps are complete: