Skip to content

[v26.2.x] core: add chunked_vector_async#293

Merged
WillemKauf merged 1 commit into
redpanda-data:v26.2.xfrom
WillemKauf:chunked-hash-map-v26.2.x
Jun 30, 2026
Merged

[v26.2.x] core: add chunked_vector_async#293
WillemKauf merged 1 commit into
redpanda-data:v26.2.xfrom
WillemKauf:chunked-hash-map-v26.2.x

Conversation

@WillemKauf

Copy link
Copy Markdown

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.hh with chunked_vector_fill_async() and chunked_vector_clear_async().
  • Extends chunked_vector with 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 thread tests/unit/CMakeLists.txt
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();
}
@WillemKauf WillemKauf merged commit 414dfe7 into redpanda-data:v26.2.x Jun 30, 2026
36 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants