Skip to content

Commit

Permalink
remove some pub
Browse files Browse the repository at this point in the history
Signed-off-by: CalvinNeo <[email protected]>
  • Loading branch information
CalvinNeo committed Sep 7, 2022
1 parent 572b2bc commit f165e8e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion components/engine_rocks/src/encryption.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use rocksdb::{
use crate::raw::Env;

// Use engine::Env directly since Env is not abstracted.
pub fn get_env(
pub(crate) fn get_env(
base_env: Option<Arc<Env>>,
key_manager: Option<Arc<DataKeyManager>>,
) -> std::result::Result<Arc<Env>, String> {
Expand Down
2 changes: 1 addition & 1 deletion components/engine_rocks/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use crate::{

#[derive(Clone, Debug)]
pub struct RocksEngine {
pub db: Arc<DB>,
db: Arc<DB>,
shared_block_cache: bool,
}

Expand Down
4 changes: 2 additions & 2 deletions components/raftstore/src/engine_store_ffi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use std::{
};

use encryption::DataKeyManager;
use engine_rocks::{encryption::get_env, RocksSstIterator, RocksSstReader};
use engine_rocks::{get_env, RocksSstIterator, RocksSstReader};
use engine_traits::{
EncryptionKeyManager, EncryptionMethod, FileEncryptionInfo, Iterator, Peekable, SeekKey,
SstReader, CF_DEFAULT, CF_LOCK, CF_WRITE,
Expand Down Expand Up @@ -664,7 +664,7 @@ pub struct SSTFileReader {

impl SSTFileReader {
fn ffi_get_cf_file_reader(path: &str, key_manager: Option<Arc<DataKeyManager>>) -> RawVoidPtr {
let env = get_env(None, key_manager).unwrap();
let env = get_env(key_manager, None).unwrap();
let sst_reader_res = RocksSstReader::open_with_env(path, Some(env));
match sst_reader_res {
Err(ref e) => tikv_util::error!("Can not open sst file {:?}", e),
Expand Down
2 changes: 1 addition & 1 deletion components/sst_importer/src/sst_importer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ use crate::{
/// SstImporter manages SST files that are waiting for ingesting.
pub struct SstImporter {
dir: ImportDir,
pub key_manager: Option<Arc<DataKeyManager>>,
key_manager: Option<Arc<DataKeyManager>>,
switcher: ImportModeSwitcher,
// TODO: lift api_version as a type parameter.
api_version: ApiVersion,
Expand Down

0 comments on commit f165e8e

Please sign in to comment.