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

Method OpenFileForWrite

phxbinlogsvr/core/storage/storage_file_manager.cpp:184–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184int StorageFileManager::OpenFileForWrite(const uint64_t &instanceid, const string &file_name) {
185 LogVerbose("%s files %s, instanceid %u", __func__, file_name.c_str(), instanceid);
186 if (file_name == "") {
187 ColorLogInfo("%s no files create one, instanceid %u", __func__, instanceid);
188 return write_storage_->ReOpen(GetNewFile(instanceid));
189 } else {
190 return write_storage_->ReOpen(GetNewFile(file_name));
191 }
192}
193
194int StorageFileManager::ResetFile(const ::google::protobuf::Message &data, const string &file_name) {
195 LogVerbose("%s check file %s", __func__, file_name.c_str());

Callers

nothing calls this directly

Calls 3

LogVerboseFunction · 0.85
ColorLogInfoFunction · 0.85
ReOpenMethod · 0.80

Tested by

no test coverage detected