Mark sync as incomplete on SIGINT during thermal cooldown to prevent premature commit

This commit is contained in:
Andrea Mazzoleni 2026-09-08 10:42:14 +02:00
parent e8726ce95a
commit 9db5dc5ed1

View file

@ -1693,8 +1693,16 @@ static int state_sync_process(struct snapraid_state* state, struct snapraid_pari
/* drop until now */
state_usage_waste(state);
if (os_signal_interrupt())
if (os_signal_interrupt()) {
/*
* Mark the sync as incomplete on interruption during cooldown.
* Partial progress is flushed and durable (*sync_durable = 1), but
* completed-sync operations (state_commit() and snapshot promotion)
* must not be executed.
*/
alert = 1;
break;
}
}
/* autosave */