Convert Redwood page readers to standard coroutines - #13868
Conversation
tclinkenbeard-oai
left a comment
There was a problem hiding this comment.
Generated by Codex.
What is it trying to do?
Convert DWALPager::readPhysicalExtent and VersionedBTree::readPage from Flow actors to standard C++ coroutines while preserving Redwood’s existing page-read behavior and actor-compiled tests.
Is it correct?
The conversion preserves the original suspension points, disk-read priority, parallel-read ordering, page-reference lifetimes, error propagation, metrics, and extent-read throttling. The extent lock remains released by its existing consumer rather than by the converted coroutine.
auto extent still deduces Reference<ArenaPage>, and co_return page implicitly moves the local through FoundationDB’s coroutine promise. Existing actorcompiler scaffolding remains intact for the actor-style tests in the same file.
Public clang-format and clang-tidy checks have passed. Windows, FoundationDB builder variants, and cluster tests are still pending; no checks are currently failing.
This review was based on source inspection and public PR information only. I did not run builds, tests, or simulations for this review.
Are there bugs?
I did not find any correctness bugs.
Are there omissions?
There is no blocking omission. The validation commands listed in the PR do not explicitly select the existing Lredwood/correctness/btree or :/redwood/performance/extentQueue cases because the unit-test runner matches literal prefixes. Direct coverage of extent-read throttling, partial extents, and lock handoff is therefore the main remaining testing risk.
Are there better ways of doing things?
As an optional cleanup, readPage could assign each awaited result directly to page:
page = co_await snapshot->getPhysicalPage(...);The same simplification applies to the multipage branch and would remove the intermediate p variables and explicit std::move(p) calls. This is not required for correctness.
Should this CL be LGTMd?
Yes, LGTM based on source inspection. Wait for the pending FoundationDB builders, Windows check, and cluster tests before merging.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Result of foundationdb-pr-clang-ide on Linux RHEL 9
|
This comment has been minimized.
This comment has been minimized.
Result of foundationdb-pr-clang-arm on Linux RHEL 9
|
Result of foundationdb-pr-clang on Linux RHEL 9
|
Result of foundationdb-pr on Linux RHEL 9
|
Result of foundationdb-pr-macos-m1 on macOS 14.x
|
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
Result of foundationdb-pr-macos on macOS 14.x
macOS stat flags, not linux compatiblelock_mtime() { stat -f %m $LOCK || echo 0 }
|
Summary
DWALPager::readPhysicalExtentandVersionedBTree::readPagefrom Flow actors to C++ coroutines.Validation
clang-format-19 --dry-run --Werror fdbserver/kvstore/VersionedBTree.actor.cppfdbserver_kvstore_test -f /redwood/correctness/btreeCloseWithQueuedCommits --seed 424242fdbserver_kvstore_test -f /redwood/correctness/btreeCloseWithQueuedCommits --seed 424242 --simulationfdbserver_kvstore_test -f /redwood/correctness --seed 424242