@@ -28,15 +28,13 @@ use ckb_types::{
2828 core:: { self , BlockNumber , BlockView } ,
2929 packed:: Byte32 ,
3030} ;
31- use rocksdb:: prelude:: * ;
31+ use rocksdb:: { LogLevel , prelude:: * } ;
3232
3333use std:: marker:: Send ;
34- use std:: num:: NonZeroUsize ;
3534use std:: sync:: { Arc , RwLock } ;
3635use std:: thread:: sleep;
3736use std:: time:: Duration ;
3837
39- const DEFAULT_LOG_KEEP_NUM : usize = 1 ;
4038const INDEXER_NODE_TIP_GAP : u64 = 10 ;
4139
4240/// Trait for an indexer's synchronization interface
@@ -64,7 +62,7 @@ pub fn new_secondary_db(ckb_db_config: &DBConfig, config: &IndexerSyncConfig) ->
6462 COLUMN_BLOCK_PROPOSAL_IDS ,
6563 COLUMN_BLOCK_EXTENSION ,
6664 ] ;
67- let secondary_opts = indexer_secondary_options ( config ) ;
65+ let secondary_opts = indexer_secondary_options ( ) ;
6866 SecondaryDB :: open_cf (
6967 & secondary_opts,
7068 & ckb_db_config. path ,
@@ -301,15 +299,10 @@ impl IndexerSyncService {
301299 }
302300}
303301
304- fn indexer_secondary_options ( config : & IndexerSyncConfig ) -> Options {
302+ fn indexer_secondary_options ( ) -> Options {
305303 let mut opts = Options :: default ( ) ;
306304 opts. create_if_missing ( true ) ;
307305 opts. create_missing_column_families ( true ) ;
308- opts. set_keep_log_file_num (
309- config
310- . db_keep_log_file_num
311- . map ( NonZeroUsize :: get)
312- . unwrap_or ( DEFAULT_LOG_KEEP_NUM ) ,
313- ) ;
306+ opts. set_log_level ( LogLevel :: Warn ) ;
314307 opts
315308}
0 commit comments