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 @@ -1151,12 +1151,22 @@ impl<S: ParallelScheduler> TurboPersistence<S> {
11511151
11521152 /// Get a value from the database. Returns None if the key is not found. The returned value
11531153 /// might hold onto a block of the database and it should not be hold long-term.
1154- pub fn get < K : QueryKey > ( & self , family : usize , key : & K ) -> Result < Option < ArcSlice < u8 > > > {
1154+ pub fn get < K : QueryKey + Sync > ( & self , family : usize , key : & K ) -> Result < Option < ArcSlice < u8 > > > {
11551155 let hash = hash_key ( key) ;
1156+ self . parallel_scheduler
1157+ . block_in_place ( || self . get_inner ( family as u32 , hash, key) )
1158+ }
1159+
1160+ fn get_inner < K : QueryKey > (
1161+ & self ,
1162+ family : u32 ,
1163+ hash : u64 ,
1164+ key : & K ,
1165+ ) -> Result < Option < ArcSlice < u8 > > > {
11561166 let inner = self . inner . read ( ) ;
11571167 for meta in inner. meta_files . iter ( ) . rev ( ) {
11581168 match meta. lookup (
1159- family as u32 ,
1169+ family,
11601170 hash,
11611171 key,
11621172 & self . amqf_cache ,
You can’t perform that action at this time.
0 commit comments