diff --git a/src/container/srv_target.c b/src/container/srv_target.c index 0b17f6619b8..b5abcc2d759 100644 --- a/src/container/srv_target.c +++ b/src/container/srv_target.c @@ -1989,9 +1989,14 @@ cont_snap_update_one(void *vin) struct ds_cont_child *cont; int rc; - rc = ds_cont_child_lookup(args->pool_uuid, args->cont_uuid, &cont); + /* The container should be exist on the system at this point, if non-exist on this target + * it should be the case of reintegrate the container was destroyed ahead, so just + * open_create the container here. + */ + rc = ds_cont_child_open_create(args->pool_uuid, args->cont_uuid, &cont); if (rc != 0) return rc; + if (args->snap_count == 0) { if (cont->sc_snapshots != NULL) { D_ASSERT(cont->sc_snapshots_nr > 0); @@ -2045,9 +2050,9 @@ ds_cont_tgt_snapshots_update(uuid_t pool_uuid, uuid_t cont_uuid, * the up targets in this scenario. The target property will be updated * upon initiating container aggregation. */ - return ds_pool_task_collective(pool_uuid, PO_COMP_ST_NEW | PO_COMP_ST_DOWN | - PO_COMP_ST_DOWNOUT | PO_COMP_ST_UP, - cont_snap_update_one, &args, 0); + return ds_pool_thread_collective(pool_uuid, PO_COMP_ST_NEW | PO_COMP_ST_DOWN | + PO_COMP_ST_DOWNOUT | PO_COMP_ST_UP, + cont_snap_update_one, &args, 0); } void diff --git a/src/object/srv_obj_migrate.c b/src/object/srv_obj_migrate.c index 48a6ad3474a..6d46568b63f 100644 --- a/src/object/srv_obj_migrate.c +++ b/src/object/srv_obj_migrate.c @@ -2718,9 +2718,18 @@ migrate_enum_unpack_cb(struct dc_obj_enum_unpack_io *io, void *data) } if (!create_migrate_one) { + struct ds_cont_child *cont = NULL; + D_DEBUG(DB_REBUILD, DF_UOID"/"DF_KEY" does not need rebuild.\n", DP_UOID(io->ui_oid), DP_KEY(&io->ui_dkey)); - D_GOTO(put, rc = 0); + + /* Create the vos container when no record need to be rebuilt for this shard, + * for the case of reintegrate the container was discarded ahead. + */ + rc = migrate_get_cont_child(tls, arg->arg->cont_uuid, &cont, true); + if (cont != NULL) + ds_cont_child_put(cont); + D_GOTO(put, rc); } /* Check if some IODs from this unpack can be merged to the exist mrone, mostly for EC diff --git a/src/rebuild/scan.c b/src/rebuild/scan.c index d8479fe1220..4b9a9108fe1 100644 --- a/src/rebuild/scan.c +++ b/src/rebuild/scan.c @@ -390,7 +390,7 @@ rebuild_object_insert(struct rebuild_tgt_pool_tracker *rpt, uuid_t co_uuid, } #define LOCAL_ARRAY_SIZE 128 -#define NUM_SHARDS_STEP_INCREASE 10 +#define NUM_SHARDS_STEP_INCREASE 64 /* The structure for scan per xstream */ struct rebuild_scan_arg { struct rebuild_tgt_pool_tracker *rpt;