mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-07 21:42:56 +00:00
page_cache: replace long mutex sleep with SeqWait
When calling into the page cache, it was possible to wait on a blocking mutex, which can stall the async executor. Replace that sleep with a SeqWait::wait_for(lsn).await so that the executor can go on with other work while we wait. Change walreceiver_works to an AtomicBool to avoid the awkwardness of taking the lock, then dropping it while we call wait_for and then acquiring it again to do real work.
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -1339,6 +1339,7 @@ dependencies = [
|
||||
"tokio-stream",
|
||||
"tui",
|
||||
"walkdir",
|
||||
"zenith_utils",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
Reference in New Issue
Block a user