You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-1558. This likely covers it. First cut.
This commit is contained in:
@ -2581,7 +2581,8 @@ pid_t ProcessMonitor::startProcess(string processModuleType, string processName,
|
||||
char line[200] = {0};
|
||||
oldFile->pread(line, 0, fileSize - 1); // skip the \n
|
||||
line[fileSize] = '\0'; // not necessary, but be sure.
|
||||
string dbrmFile = line;
|
||||
// MCOL-1558 - the _current file is now relative to DBRMRoot
|
||||
string dbrmFile = DBRMroot + line;
|
||||
|
||||
// if ( !gOAMParentModuleFlag ) {
|
||||
|
||||
|
@ -100,7 +100,9 @@ int main (int argc, char** argv)
|
||||
#ifndef _MSC_VER
|
||||
prefix += '\n';
|
||||
#endif
|
||||
currentFile->write(prefix.c_str(), prefix.length());
|
||||
// for MCOL-1558. Make the _current file relative to DBRMRoot
|
||||
string relative = prefix.substr(prefix.find_last_of('/'));
|
||||
currentFile->write(relative.c_str(), relative.length());
|
||||
}
|
||||
catch (exception& e)
|
||||
{
|
||||
|
@ -2038,9 +2038,11 @@ void SlaveComm::do_confirm()
|
||||
|
||||
if (currentSaveFile)
|
||||
{
|
||||
err = currentSaveFile->write(tmp.c_str(), tmp.length());
|
||||
// MCOL-1558. Make the _current file relative to DBRMRoot.
|
||||
string relative = tmp.substr(tmp.find_last_of('/') + 1);
|
||||
err = currentSaveFile->write(relative.c_str(), relative.length());
|
||||
|
||||
if (err < (int) tmp.length())
|
||||
if (err < (int) relative.length())
|
||||
{
|
||||
ostringstream os;
|
||||
os << "WorkerComm: currentfile write() returned " << err
|
||||
@ -2070,9 +2072,11 @@ void SlaveComm::do_confirm()
|
||||
else
|
||||
{
|
||||
lseek(currentSaveFD, 0, SEEK_SET);
|
||||
err = write(currentSaveFD, tmp.c_str(), tmp.length());
|
||||
// MCOL-1558. Make the _current file relative to DBRMRoot.
|
||||
string relative = tmp.substr(tmp.find_last_of('/') + 1);
|
||||
err = write(currentSaveFD, relative.c_str(), relative.length());
|
||||
|
||||
if (err < (int) tmp.length())
|
||||
if (err < (int) relative.length())
|
||||
{
|
||||
ostringstream os;
|
||||
os << "WorkerComm: currentfile write() returned " << err
|
||||
@ -2089,7 +2093,7 @@ void SlaveComm::do_confirm()
|
||||
_chsize_s(currentSaveFD, tmp.length());
|
||||
_commit(currentSaveFD);
|
||||
#else
|
||||
err = ftruncate(currentSaveFD, tmp.length());
|
||||
err = ftruncate(currentSaveFD, relative.length());
|
||||
fsync(currentSaveFD);
|
||||
#endif
|
||||
saveFileToggle = !saveFileToggle;
|
||||
|
Reference in New Issue
Block a user