that should make it work
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good

This commit is contained in:
Robin Müller 2023-06-24 12:01:12 +02:00
parent 53b48ad99b
commit 04f4eedb78
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814

View File

@ -82,13 +82,15 @@ ReturnValue_t PersistentTmStore::buildDumpSet(uint32_t fromUnixSeconds, uint32_t
// Multiple files for the same time are supported via a special suffix. We smply count the
// number of copies and later try to dump the same number of files with the additonal
// suffixes
auto& iter = dumpParams.orderedDumpFilestamps.find(dumpIndex);
auto iter = dumpParams.orderedDumpFilestamps.find(dumpIndex);
if (iter != dumpParams.orderedDumpFilestamps.end()) {
iter->additionalFiles++;
dumpIndex.epoch = iter->epoch;
dumpIndex.additionalFiles = iter->additionalFiles + 1;
dumpParams.orderedDumpFilestamps.erase(dumpIndex);
} else {
dumpIndex.additionalFiles = 0;
dumpParams.orderedDumpFilestamps.emplace(dumpIndex);
}
dumpParams.orderedDumpFilestamps.emplace(dumpIndex);
}
}
return returnvalue::OK;
@ -326,9 +328,6 @@ ReturnValue_t PersistentTmStore::loadNextDumpFile() {
}
ifile.read(reinterpret_cast<char*>(fileBuf.data()),
static_cast<std::streamsize>(dumpParams.fileSize));
if (dumpIndex.additionalFiles > 0) {
dumpParams.currentSameFileIdx++;
}
if (dumpIndex.additionalFiles > 0 and not dumpParams.currentSameFileIdx.has_value()) {
if (not dumpParams.currentSameFileIdx.has_value()) {
// Initialze the file index and stay on same file
@ -336,7 +335,7 @@ ReturnValue_t PersistentTmStore::loadNextDumpFile() {
continue;
} else if (dumpParams.currentSameFileIdx.value() < dumpIndex.additionalFiles) {
dumpParams.currentSameFileIdx += 1;
dumpParams.currentSameFileIdx = dumpParams.currentSameFileIdx.value() + 1;
continue;
}
}