Skip to content

Commit eae3f7e

Browse files
committed
DAOS-19116 object: drop reference when fail in obj_ioc_begin_lite
It is possible that obj_ioc_begin_lite() maybe failed because of empty or stale pool map on server. At that time, the logic has already held reference against the container open handle. Under such case, directly returning error# to the caller may cause reference leak as to such container cannot be properly stopped in subsequent operations. Signed-off-by: Fan Yong <fan.yong@hpe.com>
1 parent cec6da1 commit eae3f7e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/object/srv_obj.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2355,6 +2355,10 @@ obj_ioc_begin_lite(uint32_t rpc_map_ver, uuid_t pool_uuid,
23552355
d_tm_inc_gauge(tls->ot_op_active[opc_get(rpc->cr_opc)], 1);
23562356
ioc->ioc_start_time = daos_get_ntime();
23572357
ioc->ioc_began = 1;
2358+
2359+
if (rc != 0)
2360+
obj_ioc_end(ioc, rc);
2361+
23582362
return rc;
23592363
}
23602364

0 commit comments

Comments
 (0)