You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-27 21:01:50 +03:00
Revert "feat(BRM) MCOL-5555 Reduce a number of direct writes to BRM journal/tablelocks files" (#2972)
This reverts commit 02114b5b7c
.
This commit is contained in:
@ -70,21 +70,14 @@ void TableLockServer::save()
|
||||
if (!out)
|
||||
throw runtime_error("TableLockServer::save(): could not open save file");
|
||||
|
||||
uint32_t bufferSize = 4;
|
||||
for (const auto& lock : locks)
|
||||
bufferSize += lock.second.getInternalSize();
|
||||
|
||||
std::unique_ptr<char[]> buffer(new char[bufferSize]);
|
||||
uint32_t offset = 0;
|
||||
std::memcpy(&buffer[offset], (char*)&count, 4);
|
||||
offset += 4;
|
||||
out->write((char*)&count, 4);
|
||||
|
||||
for (it = locks.begin(); it != locks.end(); ++it)
|
||||
{
|
||||
if (!out)
|
||||
throw runtime_error("TableLockServer::save(): could not write save file");
|
||||
|
||||
it->second.serialize(buffer.get(), offset);
|
||||
it->second.serialize(out.get());
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user