Check for missing files in queueNeed().
Missing files would indicate that another process is running on the same spool path, which would be a very bad thing.
This check doesn't cost any additional I/O so it seems like a good idea.
@@ -82,7 +82,7 @@ queueNeed(const String *walSegment, bool found, uint64_t queueSize, size_t walSe
// Else delete it
else
- storageRemoveP(storageSpoolWrite(), strNewFmt(STORAGE_SPOOL_ARCHIVE_IN "/%s", strZ(file)));
+ storageRemoveP(storageSpoolWrite(), strNewFmt(STORAGE_SPOOL_ARCHIVE_IN "/%s", strZ(file)), .errorOnMissing = true);
}
// Generate a list of the WAL that are needed by removing kept WAL from the ideal queue
