Skip to content

Commit

Permalink
DAOS-15007 object: fix EC aggregation's ap_min_unagg_eph set
Browse files Browse the repository at this point in the history
Should init it before any case goto update_hae, or will cause
epoch boundary cannot move ahead.

Required-githooks: true
Test-tag: test_ec_offline_rebuild_fio test_ec_online_rebuild_fio pr

Signed-off-by: Xuezhao Liu <[email protected]>
  • Loading branch information
liuxuezhao committed Feb 26, 2024
1 parent c68ac48 commit e57b8a4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/container/srv_container.c
Original file line number Diff line number Diff line change
Expand Up @@ -1756,19 +1756,19 @@ ds_cont_leader_update_agg_eph(uuid_t pool_uuid, uuid_t cont_uuid,

if (i == ec_agg->ea_servers_num) {
if (!retried) {
D_DEBUG(DB_MD, "rank %u eph "DF_U64" retry for"
D_DEBUG(DB_MD, "rank %u eph "DF_X64" retry for"
DF_CONT"\n", rank, eph,
DP_CONT(pool_uuid, cont_uuid));
retried = true;
ec_agg->ea_deleted = 1;
goto retry;
} else {
D_WARN("rank %u eph "DF_U64" does not exist for "
D_WARN("rank %u eph "DF_X64" does not exist for "
DF_CONT"\n", rank, eph,
DP_CONT(pool_uuid, cont_uuid));
}
} else {
D_DEBUG(DB_MD, DF_CONT" update eph rank %u eph "DF_U64"\n",
D_DEBUG(DB_MD, DF_CONT" update eph rank %u eph "DF_X64"\n",
DP_CONT(pool_uuid, cont_uuid), rank, eph);
}

Expand Down Expand Up @@ -1887,7 +1887,7 @@ cont_agg_eph_leader_ult(void *arg)
* server might cause the minimum epoch is less than
* ea_current_eph.
*/
D_DEBUG(DB_MD, DF_CONT" minimum "DF_U64" current "DF_U64"\n",
D_DEBUG(DB_MD, DF_CONT" minimum "DF_U64" current "DF_X64"\n",
DP_CONT(svc->cs_pool_uuid, ec_agg->ea_cont_uuid),
min_eph, ec_agg->ea_current_eph);

Expand Down
3 changes: 2 additions & 1 deletion src/object/srv_ec_aggregate.c
Original file line number Diff line number Diff line change
Expand Up @@ -2627,6 +2627,8 @@ cont_ec_aggregate_cb(struct ds_cont_child *cont, daos_epoch_range_t *epr,
return rc;
}

ec_agg_param->ap_min_unagg_eph = DAOS_EPOCH_MAX;

if (flags & VOS_AGG_FL_FORCE_SCAN) {
/** We don't want to use the latest container aggregation epoch for the filter
* in this case. We instead use the lower bound of the epoch range.
Expand Down Expand Up @@ -2660,7 +2662,6 @@ cont_ec_aggregate_cb(struct ds_cont_child *cont, daos_epoch_range_t *epr,

agg_reset_entry(&ec_agg_param->ap_agg_entry, NULL, NULL);

ec_agg_param->ap_min_unagg_eph = DAOS_EPOCH_MAX;
rc = vos_iterate(&iter_param, VOS_ITER_OBJ, true, &anchors,
agg_iterate_pre_cb, agg_iterate_post_cb, ec_agg_param, NULL);

Expand Down

0 comments on commit e57b8a4

Please sign in to comment.