Function sst_importer::prepare_sst_for_ingestion [−][src]
pub fn prepare_sst_for_ingestion<P: AsRef<Path>, Q: AsRef<Path>>(
path: P,
clone: Q,
encryption_key_manager: Option<&DataKeyManager>
) -> Result<()>
Prepares the SST file for ingestion.
The purpose is to make the ingestion retryable when using the move_files
option.
Things we need to consider here:
- We need to access the original file on retry, so we should make a clone before ingestion.
RocksDB
will modified the global seqno of the ingested file, so we need to modified the global seqno back to 0 so that we can pass the checksum validation.- If the file has been ingested to
RocksDB
, we should not modified the global seqno directly, because that may corrupt RocksDB’s data.