-
Notifications
You must be signed in to change notification settings - Fork 306
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
DAOS-16951 dtx: add invalid records discard capability #15752
base: master
Are you sure you want to change the base?
Conversation
Ticket title is 'DDB: add invalid DTX records discard capability' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The framework and the basic process are fine. The main concern is that for most of cases, the user does not know which DTX entry is corrupted. Means that related DTX ID is known. So for conveniency, the logic itself needs to iterate the active DTX table, and for each active DTX entry, calls ddb_run_dtx_act_discard_invalid().
On the other hand, please check the patch from Jeff #15747, he does similar repair with online mode. Currently, no decision about which one will be used finally, need more discussion.
Priority: 2 Required-githooks: true Signed-off-by: Jan Michalski <[email protected]>
0ca769d
to
dc392b6
Compare
I added an option to just set |
dc392b6
to
db92efd
Compare
db92efd
to
7b65089
Compare
The basic logic for discarding dangling DTX reference is fine. But my concern is that whether all the changes are related with our main purpose of resolving existing dangling DTX reference? We are so closed to the 2.6.3 deadline, I am afraid of landing such a huge patch maybe some challenged, not sure, but if possible, please split unrelated parts into subsequent patch(es). That will be helpful. |
Priority: 2 Required-githooks: true Signed-off-by: Jan Michalski <[email protected]>
Priority: 2 Required-githooks: true Signed-off-by: Jan Michalski <[email protected]>
bool | ||
vos_irec_is_valid(const struct vos_irec_df *svt, uint32_t dtx_lid) | ||
{ | ||
if (svt == NULL) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- disregard whether DAE is aborted/aborting - discard inline records first Priority: 2 Required-githooks: true Signed-off-by: Jan Michalski <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Priority: 2 Signed-off-by: Jan Michalski <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can consider to improve the ability of detection SVT record properly in subsequent patch(es).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Go and build changes LGTM
Guide's TLDR
vos_dtx_discard_invalid()
APIvos_dtx_discard_invalid()
API available via DDBdtx_ut
andddb_ut
)Guide (full)
vos_dtx_discard_invalid()
APIsrc/include/daos_srv/vos.h
- add to the header filesrc/vos/vos_dtx.c
src/vos/ilog_internal.h
for details.src/dtx/tests/dts_discard_invalid.c
- here you find all the unit tests for thevos_dtx_discard_invalid()
APIsrc/dtx/tests/SConscript
- because of the mocking requirements a newdtx_ut
unit test binary has been introducedsrc/dtx/tests/dtx_ut.c
- greatly simplified copy of thedtx_tests.c
- the entry point for all unit tests compiled in the binarysrc/dtx/tests/dts_structs.c
- because of the minimal requirements these tests fitted more to the newdtx_ut
binary rather than todtx_tests
src/vos/ilog.h
- headersrc/vos/ilog.c
- implementationsrc/vos/ilog_internal.h
for details.src/vos/tests/vts_ilog.c
- unit testssrc/vos/ilog_internal.h
- introduced to easier access ILOG internals for testing purposes.src/vos/vos_internal.h
- headersrc/vos/vos_tree.c
- implementationsrc/vos/tests/vts_tree.c
- unit testssrc/include/daos_srv/evtree.h
- header filesrc/vos/evtree.c
- impementationsrc/vos/tests/vts_evtree.c
- unit testsvos_dtx_discard_invalid()
API available via DDBsrc/utils/ddb/ddb_commands.c
ddb_run_dtx_act_discard_invalid()
implementationdtx_modify_init()
to skip DTX ID initialization ifdti_all
is requestedsrc/utils/ddb/tests/ddb_commands_tests.c
- simple testssrc/utils/ddb/ddb.h
:ddb_run_dtx_act_discard_invalid()
struct dtx_act_commit_options
andstruct dtx_act_abort_options
with a singlestruct dtx_act_options
which works for bothdtx_act_commit
anddtx_act_abort
commands as well as the newly introduceddtx_act_discard_invalid
src/utils/ddb/tests/ddb_cmd_options_tests.c
- update tests accordinglysrc/utils/ddb/ddb.c
:dtx_act_option_parse()
instead ofdtx_act_commit_option_parse()
anddtx_act_abort_option_parse()
which works for both old and newdtx_act_*
commandsdv_dtx_active_entry_discard_invalid()
proxysrc/utils/ddb/ddb_vos.h
andsrc/utils/ddb/ddb_vos.c
src/utils/ddb/tests/ddb_vos_ut.c
- unit testssrc/utils/ddb/tests/SConscript
- because of the mocking requirements a newddb_ut
unit test binary has been introducedsrc/utils/ddb/tests/ddb_ut.c
- greatly simplified copy of theddb_test_driver.c
- the entry point for all unit tests compiled in the binarydtx_ut
andddb_ut
)utils/utest.yaml
- add them to standard execution outletsutils/rpms/daos.spec
- add them to the RPM packageutils/rpms/daos.rpmlintrc
- add them as yet another binaries without manualsdebian/daos-server-tests.install
- add them to the DEB packagedebian/changelog
- report above in the changelogBefore requesting gatekeeper:
Features:
(orTest-tag*
) commit pragma was used or there is a reason documented that there are no appropriate tags for this PR.Gatekeeper: