Skip to content

Commit

Permalink
use new interface with hex_smallest, hex_largest and epoch_number
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyihua-cn committed May 22, 2024
1 parent 8478bea commit 01ab281
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[submodule "librocksdb-sys/rocksdb"]
path = librocksdb-sys/rocksdb
url = https://github.com/haizhi-tech/rocksdb.git
branch = v7.9.2_statistics_cf
branch = v8.1.1-hz-snapshot-fix
[submodule "librocksdb-sys/lz4"]
path = librocksdb-sys/lz4
url = https://github.com/lz4/lz4.git
2 changes: 1 addition & 1 deletion librocksdb-sys/rocksdb
Submodule rocksdb updated 2 files
+11 −1 db/c.cc
+2 −1 include/rocksdb/c.h
8 changes: 8 additions & 0 deletions src/checkpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ pub struct RocksdbLevelMetaData {
file_creation_time: u64,
file_checksum: String,
file_checksum_func_name: String,
epoch_number: u64,
hex_smallest: String,
hex_largest: String,
}

impl ExportImportFilesMetaData {
Expand Down Expand Up @@ -123,6 +126,8 @@ impl ExportImportFilesMetaData {
let hex_largestkey = CString::new(file.hex_largestkey).unwrap();
let file_checksum = CString::new(file.file_checksum).unwrap();
let file_checksum_func_name = CString::new(file.file_checksum_func_name).unwrap();
let hex_smallest = CString::new(file.hex_smallest).unwrap();
let hex_largest = CString::new(file.hex_largest).unwrap();
files.push(ffi_try!(ffi::rocksdb_new_live_file_metadata(
column_family_name.as_ptr(),
file.level,
Expand All @@ -147,6 +152,9 @@ impl ExportImportFilesMetaData {
file.file_creation_time,
file_checksum.as_ptr(),
file_checksum_func_name.as_ptr(),
file.epoch_number,
hex_smallest.as_ptr(),
hex_largest.as_ptr(),
)));
}

Expand Down

0 comments on commit 01ab281

Please sign in to comment.