Skip to content

Commit

Permalink
Integrated BlobDB for backup/restore support (#8129)
Browse files Browse the repository at this point in the history
Summary:
Add support for blob files for backup/restore like table files.
    Since DB session ID is currently not supported for blob files (there is no place to store it in
    the header), so for blob files uses the
    kLegacyCrc32cAndFileSize naming scheme even if
    share_files_with_checksum_naming is set to kUseDbSessionId.

Pull Request resolved: facebook/rocksdb#8129

Test Plan: Add new test units

Reviewed By: ltamasi

Differential Revision: D27408510

Pulled By: akankshamahajan15

fbshipit-source-id: b27434d189a639ef3e6ad165c61a143a2daaf06e
Signed-off-by: Changlong Chen <levisonchen@live.cn>
  • Loading branch information
akankshamahajan15 authored and levichen94 committed Sep 14, 2021
1 parent c8c0039 commit 939aae7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions env/file_system.cc
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ FileOptions FileSystem::OptimizeForCompactionTableRead(
return optimized_file_options;
}

FileOptions FileSystem::OptimizeForBlobFileRead(
const FileOptions& file_options,
const ImmutableDBOptions& db_options) const {
FileOptions optimized_file_options(file_options);
optimized_file_options.use_direct_reads = db_options.use_direct_reads;
return optimized_file_options;
}

IOStatus WriteStringToFile(FileSystem* fs, const Slice& data,
const std::string& fname, bool should_sync) {
std::unique_ptr<FSWritableFile> file;
Expand Down

0 comments on commit 939aae7

Please sign in to comment.