File tree Expand file tree Collapse file tree 1 file changed +2
-14
lines changed
turbopack/crates/turbo-tasks-backend/src/database/turbo Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -37,24 +37,12 @@ pub struct TurboKeyValueDatabase {
3737impl TurboKeyValueDatabase {
3838 pub fn new ( versioned_path : PathBuf , is_ci : bool , is_short_session : bool ) -> Result < Self > {
3939 let db = Arc :: new ( TurboPersistence :: open ( versioned_path) ?) ;
40- let mut this = Self {
40+ Ok ( Self {
4141 db : db. clone ( ) ,
4242 compact_join_handle : Mutex :: new ( None ) ,
4343 is_ci,
4444 is_short_session,
45- } ;
46- // start compaction in background if the database is not empty
47- if !db. is_empty ( ) {
48- let handle = spawn ( async move {
49- db. compact ( & CompactConfig {
50- max_merge_segment_count : available_parallelism ( )
51- . map_or ( 4 , |c| max ( 4 , c. get ( ) / 4 ) ) ,
52- ..COMPACT_CONFIG
53- } )
54- } ) ;
55- this. compact_join_handle . get_mut ( ) . replace ( handle) ;
56- }
57- Ok ( this)
45+ } )
5846 }
5947}
6048
You can’t perform that action at this time.
0 commit comments