MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / getOrCreateDataFH

Method getOrCreateDataFH

src/storage/buffer_manager/spiller.cpp:26–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26FileHandle* Spiller::getOrCreateDataFH() const {
27 if (dataFH.load()) {
28 return dataFH;
29 }
30 std::unique_lock lock(fileCreationMutex);
31 // Another thread may have created the file while the lock was being acquired
32 if (dataFH.load()) {
33 return dataFH;
34 }
35 const_cast<Spiller*>(this)->dataFH = bufferManager.getFileHandle(tmpFilePath,
36 FileHandle::O_PERSISTENT_FILE_CREATE_NOT_EXISTS, vfs, nullptr);
37 return dataFH;
38}
39
40FileHandle* Spiller::getDataFH() const {
41 if (dataFH.load()) {

Callers

nothing calls this directly

Calls 2

loadMethod · 0.45
getFileHandleMethod · 0.45

Tested by

no test coverage detected