Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/vos/vos_obj.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,16 @@ vos_obj_punch(daos_handle_t coh, daos_unit_oid_t oid, daos_epoch_t epoch,
if (rc != 0)
goto reset;

if (!(hold_flags & VOS_OBJ_CREATE) && (obj->obj_df == NULL)) {
rc = vos_ilog_ts_add(ts_set, NULL, &oid, sizeof(oid));
D_ASSERT(rc == 0);

rc = -DER_NONEXIST;
vos_obj_release(obj, 0, true);
obj = NULL;
goto reset;
}

rc = vos_tx_begin(dth, vos_cont2umm(cont), cont->vc_pool->vp_sysdb, obj);
if (rc != 0)
goto reset;
Expand Down
2 changes: 2 additions & 0 deletions src/vos/vos_obj_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,8 @@ vos_obj_incarnate(struct vos_object *obj, daos_epoch_range_t *epr, daos_epoch_t
if (rc == 0) {
obj->obj_sync_epoch = obj->obj_df->vo_sync;
} else if (rc == -DER_NONEXIST) {
if (!(flags & VOS_OBJ_CREATE))
return -DER_NONEXIST;
rc = vos_oi_alloc(cont, obj->obj_id, epr->epr_hi, &obj->obj_df, ts_set);
if (rc) {
DL_ERROR(rc, DF_CONT ": Failed to allocate OI " DF_UOID ".",
Expand Down
Loading