From 295ba657246d96dce2b97400b46f27e992cac774 Mon Sep 17 00:00:00 2001 From: Patrick LeBlanc Date: Mon, 24 Feb 2020 10:11:55 -0500 Subject: [PATCH] MCOL-3829: CS not starting correctly if rebooted at specific point Found that the IDBDataFile path in BRM journal writing code needs to seek to the end of the file before writing. If save_brm is run (as it is during init), it truncates the journal file, but the workernode retained its original offset, resulting in the front of the file being 0-filled on the next journal write. Load_brm can't load that. --- versioning/BRM/slavecomm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versioning/BRM/slavecomm.cpp b/versioning/BRM/slavecomm.cpp index d2106d0dd..eef66bea4 100644 --- a/versioning/BRM/slavecomm.cpp +++ b/versioning/BRM/slavecomm.cpp @@ -2266,7 +2266,7 @@ void SlaveComm::saveDelta() { uint32_t len = delta.length(); - + journalh->seek(0, SEEK_END); journalh->write((const char*) &len, sizeof(len)); journalh->write((const char*) delta.buf(), delta.length()); journalh->flush();