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

Method rollback

source/core/StarBTreeDatabase.cpp:292–304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

290}
291
292void BTreeDatabase::rollback() {
293 WriteLocker writeLocker(m_lock);
294
295 m_availableBlocks.clear();
296 m_indexCache.clear();
297 m_uncommittedWrites.clear();
298 m_uncommitted.clear();
299
300 readRoot();
301
302 if (m_device->isWritable())
303 m_device->resize(m_deviceSize);
304}
305
306void BTreeDatabase::close(bool closeDevice) {
307 WriteLocker writeLocker(m_lock);

Callers 9

loadSectorMethod · 0.80
activateSectorMethod · 0.80
generateQueueMethod · 0.80
tickMethod · 0.80
unloadAllMethod · 0.80
syncMethod · 0.80
readChunksMethod · 0.80
testBTreeDatabaseFunction · 0.80

Calls 3

isWritableMethod · 0.80
clearMethod · 0.45
resizeMethod · 0.45

Tested by 1

testBTreeDatabaseFunction · 0.64