daos icon indicating copy to clipboard operation
daos copied to clipboard

DAOS-11915 ddb: Reregistration of btree doesn't fail

Open ryon-jensen opened this issue 3 years ago • 1 comments

It was discovered by the ddb tool that when vos_self_init/fini are called repeatedly, the container btree class is never really 'unregistered' so registering again causes it to fail with -DER_EXIST. This changes that behavior so that if registering and the class already exists, it will check if it's registering the same thing, then returns success. The registration process does not allocate memory or resources so there is no harm in multiple registrations.

Signed-off-by: Ryon Jensen [email protected]

Before requesting gatekeeper:

  • [ ] Two review approvals and any prior change requests have been resolved.
  • [ ] Testing is complete and all tests passed or there is a reason documented in the PR why it should be force landed and forced-landing tag is set.
  • [ ] Commit messages follows the guidelines outlined here.
  • [ ] Any tests skipped by the ticket being addressed have been run and passed in the PR.

Gatekeeper:

  • [ ] You are the appropriate gatekeeper to be landing the patch.
  • [ ] The PR has 2 reviews by people familiar with the code, including appropriate watchers.
  • [ ] Githooks were used. If not, request that user install them and check copyright dates.
  • [ ] Checkpatch issues are resolved. Pay particular attention to ones that will show up on future PRs.
  • [ ] All builds have passed. Check non-required builds for any new compiler warnings.
  • [ ] Sufficent testing is done. Check feature pragmas and test tags and that tests skipped for the ticket are run and now pass with the changes.
  • [ ] If applicable, the PR has addressed any potential version compatibility issues.
  • [ ] Check the target branch. If it is master branch, should the PR go to a feature branch? If it is a release branch, does it have merge approval in the JIRA ticket.
  • [ ] Extra checks if forced landing is requested
    • [ ] Review comments are sufficiently resolved, particularly by prior reviewers that requested changes.
    • [ ] No new NLT or valgrind warnings. Check the classic view.
    • [ ] Quick-build or Quick-functional is not used.
  • [ ] Fix the commit message upon landing. Check the standard here. Edit it to create a single commit. If necessary, ask submitter for a new summary.

ryon-jensen avatar Oct 14 '22 20:10 ryon-jensen

Bug-tracker data: Ticket title is 'Fix for btree re-registration' Status is 'In Review' Errors are Unknown component https://daosio.atlassian.net/browse/DAOS-11915

github-actions[bot] avatar Oct 14 '22 20:10 github-actions[bot]

Jira report fails because 'ddb' component doesn't exist yet. It will be a directory later when cat_recovery feature branch is moved, but I think for now the component should actually be changed to 'vos' instead of ddb. I'll update the title of the PR. Is that what's used for the commit message?

ryon-jensen avatar Oct 17 '22 15:10 ryon-jensen

Requested @daos-stack/daos-gatekeeper with forced-landing label because of Jira Report failure which causes a red X :-(

ryon-jensen avatar Oct 18 '22 14:10 ryon-jensen