MCPcopy Create free account
hub / github.com/Tencent/phxsql / GetPreReadFile

Method GetPreReadFile

phxbinlogsvr/core/storage/storage_file_manager.cpp:145–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145int StorageFileManager::GetPreReadFile() {
146 auto it = file_list_.find(read_storage_->GetFileName());
147 if (it == file_list_.end())
148 return NO_FILES;
149
150 if (it == file_list_.begin())
151 return NO_FILES;
152 --it;
153
154 return read_storage_->ReOpen(*it);
155}
156
157int StorageFileManager::OpenNewWriteFile(const uint64_t &instanceid) {
158 return write_storage_->SetFileWritePos(GetNewFile(instanceid), 0);

Callers 1

GetNewestCheckPointMethod · 0.80

Calls 2

GetFileNameMethod · 0.80
ReOpenMethod · 0.80

Tested by

no test coverage detected