1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-12-09 10:41:14 +03:00

Added assertions around the file deletes in syncwithjournal.

This commit is contained in:
Patrick LeBlanc
2019-05-21 16:05:27 -05:00
parent 88de938913
commit 0dcbc10b5e

View File

@@ -491,7 +491,11 @@ void Synchronizer::synchronizeWithJournal(const string &sourceFile, list<string>
count += err;
}
cache->rename(key, newKey, size - bf::file_size(oldCachePath));
replicator->remove(oldCachePath.string().c_str());
#ifndef NDEBUG
assert(replicator->remove(oldCachePath) == 0);
#else
replicator->remove(oldCachePath);
#endif
}
// update the metadata for the source file
@@ -504,7 +508,11 @@ void Synchronizer::synchronizeWithJournal(const string &sourceFile, list<string>
// delete the old object & journal file
cache->deletedJournal(bf::file_size(journalName));
replicator->remove(journalName.c_str());
#ifndef NDEBUG
assert(replicator->remove(journalName) == 0);
#else
replicator->remove(journalName);
#endif
cs->deleteObject(key);
}