[v26.2.x] core: add chunked_vector_async#293
Merged
WillemKauf merged 1 commit intoJun 30, 2026
Merged
Conversation
StephanDollberg
approved these changes
Jun 30, 2026
There was a problem hiding this comment.
Pull request overview
Adds chunked_vector_async helpers to Seastar’s chunked_vector to support non-blocking bulk operations (fill/clear) that periodically yield to avoid reactor stalls, along with unit tests and build integration.
Changes:
- Introduces
include/seastar/core/chunked_vector_async.hhwithchunked_vector_fill_async()andchunked_vector_clear_async(). - Extends
chunked_vectorwith friend declarations needed for direct fragment access by the async helpers. - Adds a new unit test and wires it into the unit-test CMake target and top-level header list.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
include/seastar/core/chunked_vector_async.hh |
Adds async fill/clear helpers that yield on preemption. |
include/seastar/core/chunked_vector.hh |
Adds forward declarations + friend access for async helpers. |
tests/unit/chunked_vector_async_test.cc |
Adds unit tests for async fill/clear behavior. |
tests/unit/CMakeLists.txt |
Registers the new unit test target. |
CMakeLists.txt |
Adds the new header to the seastar library header list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+332
to
+334
| seastar_add_test (chunked_vector_async | ||
| SOURCES chunked_vector_async_test.cc) | ||
|
|
Comment on lines
+68
to
+76
| future<> chunked_vector_clear_async(chunked_vector<T>& vec) { | ||
| while (!vec._frags.empty()) { | ||
| vec._frags.pop_back(); | ||
| if (need_preempt()) { | ||
| co_await yield(); | ||
| } | ||
| } | ||
| vec.clear(); | ||
| } |
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Forgot to pull this in as well in #289. Because we need to access private members of
chunked_vector, it makes sense for this to be in the same repository.