MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / commitWrites

Method commitWrites

source/core/StarBTreeDatabase.cpp:1130–1136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1128}
1129
1130void BTreeDatabase::commitWrites() {
1131 for (auto& write : m_uncommittedWrites)
1132 m_device->writeFullAbsolute(HeaderSize + write.first * (StreamOffset)m_blockSize, write.second.ptr(), m_blockSize);
1133
1134 m_device->sync();
1135 m_uncommittedWrites.clear();
1136}
1137
1138bool BTreeDatabase::tryFlatten() {
1139 if (m_headFreeIndexBlock == InvalidBlockIndex || m_rootIsLeaf || !m_device->isWritable())

Callers

nothing calls this directly

Calls 4

writeFullAbsoluteMethod · 0.80
ptrMethod · 0.45
syncMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected