mirror of https://github.com/facebook/rocksdb.git
Add missing RemapFileSystem::ReopenWritableFile (#12941)
Summary: `RemapFileSystem::ReopenWritableFile` is missing, add it. Pull Request resolved: https://github.com/facebook/rocksdb/pull/12941 Reviewed By: pdillinger Differential Revision: D61822540 Pulled By: cbi42 fbshipit-source-id: dc228f7e8b842216f63de8b925cb663898455345
This commit is contained in:
parent
0e04ef1a96
commit
8648fbcba3
|
@ -77,6 +77,17 @@ IOStatus RemapFileSystem::NewWritableFile(
|
|||
result, dbg);
|
||||
}
|
||||
|
||||
IOStatus RemapFileSystem::ReopenWritableFile(
|
||||
const std::string& fname, const FileOptions& options,
|
||||
std::unique_ptr<FSWritableFile>* result, IODebugContext* dbg) {
|
||||
auto status_and_enc_path = EncodePathWithNewBasename(fname);
|
||||
if (!status_and_enc_path.first.ok()) {
|
||||
return status_and_enc_path.first;
|
||||
}
|
||||
return FileSystemWrapper::ReopenWritableFile(status_and_enc_path.second,
|
||||
options, result, dbg);
|
||||
}
|
||||
|
||||
IOStatus RemapFileSystem::ReuseWritableFile(
|
||||
const std::string& fname, const std::string& old_fname,
|
||||
const FileOptions& options, std::unique_ptr<FSWritableFile>* result,
|
||||
|
|
|
@ -65,6 +65,11 @@ class RemapFileSystem : public FileSystemWrapper {
|
|||
std::unique_ptr<FSWritableFile>* result,
|
||||
IODebugContext* dbg) override;
|
||||
|
||||
IOStatus ReopenWritableFile(const std::string& fname,
|
||||
const FileOptions& options,
|
||||
std::unique_ptr<FSWritableFile>* result,
|
||||
IODebugContext* dbg) override;
|
||||
|
||||
IOStatus ReuseWritableFile(const std::string& fname,
|
||||
const std::string& old_fname,
|
||||
const FileOptions& options,
|
||||
|
|
Loading…
Reference in New Issue