Wrap all submit_primary_xxx_subops waits with if (n_subops) > 0

This commit is contained in:
Vitaliy Filippov
2026-05-11 15:17:50 +03:00
parent 7432494e88
commit 5100f822d8
3 changed files with 25 additions and 10 deletions
+5 -2
View File
@@ -769,8 +769,11 @@ resume_3:
op_data->fact_ver++;
submit_primary_del_subops(cur_op, NULL, 0, op_data->object_state ? op_data->object_state->osd_set : pg.cur_loc_set);
resume_4:
op_data->st = 4;
return;
if (op_data->n_subops > 0)
{
op_data->st = 4;
return;
}
resume_5:
if (op_data->errors > 0)
{
+5 -2
View File
@@ -145,8 +145,11 @@ resume_4:
// Stabilize version sets, if any
submit_primary_stab_subops(cur_op);
resume_5:
op_data->st = 5;
return;
if (op_data->n_subops > 0)
{
op_data->st = 5;
return;
}
}
resume_6:
if (op_data->errors > 0)
+15 -6
View File
@@ -231,8 +231,11 @@ resume_10:
}
submit_primary_subops(SUBMIT_WRITE, op_data->target_ver, pg.cur_set.data(), cur_op);
resume_4:
op_data->st = 4;
return;
if (op_data->n_subops > 0)
{
op_data->st = 4;
return;
}
resume_5:
if (op_data->errors > 0)
{
@@ -247,8 +250,11 @@ resume_5:
{
submit_primary_rollback_subops(cur_op, pg.cur_set.data());
resume_11:
op_data->st = 11;
return;
if (op_data->n_subops > 0)
{
op_data->st = 11;
return;
}
resume_12:
// Ignore ROLLBACK errors - submit_primary_subops will drop the connection if it fails
delete[] op_data->unstable_writes;
@@ -487,8 +493,11 @@ immediate:
}
submit_primary_stab_subops(cur_op);
resume_6:
op_data->st = 6;
return false;
if (op_data->n_subops > 0)
{
op_data->st = 6;
return false;
}
resume_7:
// FIXME: Free those in the destructor?
delete op_data->unstable_write_osds;