Skip to content

Commit

Permalink
Fixed CORE-3512: Server hangs when trace is running (big thanks to Vlad)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPeshkoff committed Jun 3, 2011
1 parent 00af466 commit 248d4ee
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/jrd/trace/TraceLog.cpp
Expand Up @@ -193,9 +193,14 @@ size_t TraceLog::write(const void* buf, size_t size)
// While this instance of writer was idle, new log file was created.
// More, if current file was already read by reader, we must delete it.
::close(m_fileHandle);
if (m_fileNum < sh_mem_header->readFileNum) {
if (m_fileNum < sh_mem_header->readFileNum)
{
removeFile(m_fileNum);
}
if (m_fileNum == sh_mem_header->writeFileNum)
{
++sh_mem_header->writeFileNum;
}
m_fileNum = sh_mem_header->writeFileNum;
m_fileHandle = openFile(m_fileNum);
continue;
Expand Down

0 comments on commit 248d4ee

Please sign in to comment.