File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
turbopack/crates/turbo-persistence/src Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -1152,12 +1152,22 @@ impl<S: ParallelScheduler> TurboPersistence<S> {
11521152
11531153 /// Get a value from the database. Returns None if the key is not found. The returned value
11541154 /// might hold onto a block of the database and it should not be hold long-term.
1155- pub fn get < K : QueryKey > ( & self , family : usize , key : & K ) -> Result < Option < ArcSlice < u8 > > > {
1155+ pub fn get < K : QueryKey + Sync > ( & self , family : usize , key : & K ) -> Result < Option < ArcSlice < u8 > > > {
11561156 let hash = hash_key ( key) ;
1157+ self . parallel_scheduler
1158+ . block_in_place ( || self . get_inner ( family as u32 , hash, key) )
1159+ }
1160+
1161+ fn get_inner < K : QueryKey > (
1162+ & self ,
1163+ family : u32 ,
1164+ hash : u64 ,
1165+ key : & K ,
1166+ ) -> Result < Option < ArcSlice < u8 > > > {
11571167 let inner = self . inner . read ( ) ;
11581168 for meta in inner. meta_files . iter ( ) . rev ( ) {
11591169 match meta. lookup (
1160- family as u32 ,
1170+ family,
11611171 hash,
11621172 key,
11631173 & self . amqf_cache ,
You can’t perform that action at this time.
0 commit comments