-
Notifications
You must be signed in to change notification settings - Fork 304
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-16876 vos: set cont parameter when deregister modification from DTX #15657
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -296,6 +296,15 @@ gc_drain_cont(struct vos_gc *gc, struct vos_pool *pool, daos_handle_t coh, | |
int i; | ||
int rc; | ||
|
||
/* | ||
* When we prepaer to drain the container, we do not need DTX entry any long. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. typo s/prepaer/prepare |
||
* Then destroy DTX table firstly to avoid dangling DXT records during drain | ||
* the container (that may yield). | ||
*/ | ||
rc = vos_dtx_table_destroy(&pool->vp_umm, cont); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see why it's moved here, then it'll called on draining every object? The original place looks more proper to me. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because in gc_drain_cont(), there is assertion: |
||
if (rc != 0) | ||
return rc; | ||
|
||
/** Move any leftover bags to the pool gc */ | ||
for (i = GC_AKEY; i < GC_CONT; i++) { | ||
src_bin = &cont->cd_gc_bins[i]; | ||
|
@@ -331,11 +340,7 @@ gc_free_cont(struct vos_gc *gc, struct vos_pool *pool, daos_handle_t coh, struct | |
} | ||
} | ||
|
||
rc = vos_dtx_table_destroy(&pool->vp_umm, cd); | ||
if (rc == 0) | ||
rc = umem_free(&pool->vp_umm, item->it_addr); | ||
|
||
return rc; | ||
return umem_free(&pool->vp_umm, item->it_addr); | ||
} | ||
|
||
static struct vos_gc gc_table[] = { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2599,7 +2599,7 @@ vos_obj_iter_aggregate(daos_handle_t ih, bool range_discard) | |
* be aborted. Then it will be added and handled via GC when ktr_rec_free(). | ||
*/ | ||
|
||
rc = dbtree_iter_delete(oiter->it_hdl, NULL); | ||
rc = dbtree_iter_delete(oiter->it_hdl, obj->obj_cont); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this seems like the main bug here |
||
D_ASSERT(rc != -DER_NONEXIST); | ||
} else if (rc == -DER_NONEXIST) { | ||
/* Key no longer exists at epoch but isn't empty */ | ||
|
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.
Return error?
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.
Maybe risky, for some case, such as the DTX entry has been removed for error cleanup but related DTX sponsor may still cache some stable information. Then deregister the DTX record may not find the entry. On the other hand, non-exist DTX record when deregister is not fatal. Consider current patch, we destroy the DTX table firstly during drain the container, it may also cause non-exist case.