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 @@ -40,24 +40,12 @@ pub struct TurboKeyValueDatabase {
4040impl TurboKeyValueDatabase {
4141 pub fn new ( versioned_path : PathBuf , is_ci : bool , is_short_session : bool ) -> Result < Self > {
4242 let db = Arc :: new ( TurboPersistence :: open ( versioned_path) ?) ;
43- let mut this = Self {
43+ Ok ( Self {
4444 db : db. clone ( ) ,
4545 compact_join_handle : Mutex :: new ( None ) ,
4646 is_ci,
4747 is_short_session,
48- } ;
49- // start compaction in background if the database is not empty
50- if !db. is_empty ( ) {
51- let handle = spawn ( async move {
52- db. compact ( & CompactConfig {
53- max_merge_segment_count : available_parallelism ( )
54- . map_or ( 4 , |c| max ( 4 , c. get ( ) / 4 ) ) ,
55- ..COMPACT_CONFIG
56- } )
57- } ) ;
58- this. compact_join_handle . get_mut ( ) . replace ( handle) ;
59- }
60- Ok ( this)
48+ } )
6149 }
6250}
6351
You can’t perform that action at this time.
0 commit comments