Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
31b8f125
Commit
31b8f125
authored
Aug 06, 2025
by
Tobias Koppers
Committed by
Tobias Koppers
Aug 25, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Turbopack: use block_in_place for db reads
parent
9490832f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
db.rs
turbopack/crates/turbo-persistence/src/db.rs
+12
-2
No files found.
turbopack/crates/turbo-persistence/src/db.rs
View file @
31b8f125
...
...
@@ -1152,12 +1152,22 @@ impl<S: ParallelScheduler> TurboPersistence<S> {
/// Get a value from the database. Returns None if the key is not found. The returned value
/// might hold onto a block of the database and it should not be hold long-term.
pub
fn
get
<
K
:
QueryKey
>
(
&
self
,
family
:
usize
,
key
:
&
K
)
->
Result
<
Option
<
ArcSlice
<
u8
>>>
{
pub
fn
get
<
K
:
QueryKey
+
Sync
>
(
&
self
,
family
:
usize
,
key
:
&
K
)
->
Result
<
Option
<
ArcSlice
<
u8
>>>
{
let
hash
=
hash_key
(
key
);
self
.parallel_scheduler
.block_in_place
(||
self
.get_inner
(
family
as
u32
,
hash
,
key
))
}
fn
get_inner
<
K
:
QueryKey
>
(
&
self
,
family
:
u32
,
hash
:
u64
,
key
:
&
K
,
)
->
Result
<
Option
<
ArcSlice
<
u8
>>>
{
let
inner
=
self
.inner
.read
();
for
meta
in
inner
.meta_files
.iter
()
.rev
()
{
match
meta
.lookup
(
family
as
u32
,
family
,
hash
,
key
,
&
self
.amqf_cache
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment