Trigger double autosync when switching PG state to prevent leaving garbage in non-immediate_commit clusters

This commit is contained in:
Vitaliy Filippov
2024-11-15 01:26:36 +03:00
parent 5864bd067c
commit 8202ee9d74
4 changed files with 34 additions and 2 deletions
+9
View File
@@ -9,6 +9,10 @@ void osd_t::autosync()
{
if (immediate_commit != IMMEDIATE_ALL && !autosync_op)
{
if (autosync_copies_to_delete > 0)
{
autosync_copies_to_delete--;
}
autosync_op = new osd_op_t();
autosync_op->op_type = OSD_OP_IN;
autosync_op->peer_fd = SELF_FD;
@@ -29,6 +33,11 @@ void osd_t::autosync()
}
delete autosync_op;
autosync_op = NULL;
if (autosync_copies_to_delete > 0)
{
// Trigger the second "copies_to_delete" autosync
autosync();
}
};
exec_op(autosync_op);
}