Detect and auto-heal content replicas left at different publication generations

This commit is contained in:
Andrea Mazzoleni 2026-09-07 10:56:48 +02:00
parent 74647cda14
commit 5e4cca1fe3
3 changed files with 124 additions and 64 deletions

View file

@ -862,3 +862,20 @@ int ssync(STREAM* s)
}
#endif
int smtime(STREAM* s, int64_t mtime_sec, int mtime_nsec)
{
unsigned i;
for (i = 0; i < s->handle_size; ++i) {
if (s->handle[i].f != -1 && fmtime(s->handle[i].f, mtime_sec, mtime_nsec) != 0) {
/* LCOV_EXCL_START */
s->state = STREAM_STATE_ERROR;
s->state_index = i;
return -1;
/* LCOV_EXCL_STOP */
}
}
return 0;
}