pub struct ShareFilesNaming(/* private fields */);Expand description
Naming scheme for table and blob files in the shared_checksum directory.
Mirrors BackupEngineOptions::ShareFilesNaming in
include/rocksdb/utilities/backup_engine.h. It is a bit mask with two
parts: the low 16 bits select one naming scheme, the high bits carry
independent flags. RocksDB masks the two apart with
Self::MASK_NO_NAMING_FLAGS and Self::MASK_NAMING_FLAGS.
Only takes effect when both share_table_files and
share_files_with_checksum are true.
Implementations§
Sourcepub const LEGACY_CRC32C_AND_FILE_SIZE: Self
pub const LEGACY_CRC32C_AND_FILE_SIZE: Self
kLegacyCrc32cAndFileSize. Names files
<file_number>_<crc32c>_<file_size>.sst and .blob. Only recommended
for preserving old behaviour: the triple can collide at massive scale,
and picking the name requires reading the whole file to checksum it.
Sourcepub const USE_DB_SESSION_ID: Self
pub const USE_DB_SESSION_ID: Self
kUseDbSessionId. Names SST files <file_number>_s<db_session_id>.sst,
which is strongly unique and known without reading the file. Blob files
and SST files with no session id fall back to
Self::LEGACY_CRC32C_AND_FILE_SIZE.
Sourcepub const FLAG_INCLUDE_FILE_SIZE: Self
pub const FLAG_INCLUDE_FILE_SIZE: Self
kFlagIncludeFileSize. Inserts _<file_size> before the extension when
the scheme does not already include it.
This is bit 31. The C API passes the mask as an int, so a value
carrying this flag reads back negative from Self::bits.
Sourcepub const MASK_NO_NAMING_FLAGS: Self
pub const MASK_NO_NAMING_FLAGS: Self
kMaskNoNamingFlags. Selects the naming scheme bits.
Sourcepub const MASK_NAMING_FLAGS: Self
pub const MASK_NAMING_FLAGS: Self
kMaskNamingFlags. Selects the flag bits.
Sourcepub const DEFAULT: Self
pub const DEFAULT: Self
The RocksDB default, Self::USE_DB_SESSION_ID with
Self::FLAG_INCLUDE_FILE_SIZE.
Trait Implementations§
Source§fn clone(&self) -> ShareFilesNaming
fn clone(&self) -> ShareFilesNaming
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more