Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v24.1.x] storage/index_state: use chunked_vector #22967

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/v/storage/index_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ struct index_state
model::timestamp max_timestamp{0};

/// breaking indexes into their own has a 6x latency reduction
fragmented_vector<uint32_t> relative_offset_index;
fragmented_vector<uint32_t> relative_time_index;
fragmented_vector<uint64_t> position_index;
chunked_vector<uint32_t> relative_offset_index;
chunked_vector<uint32_t> relative_time_index;
chunked_vector<uint64_t> position_index;

// flag indicating whether the maximum timestamp on the batches
// of this segment are monontonically increasing.
Expand Down
2 changes: 1 addition & 1 deletion src/v/storage/tests/index_state_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static storage::index_state make_random_index_state(
}

if (apply_offset == storage::offset_delta_time::no) {
fragmented_vector<uint32_t> time_index;
chunked_vector<uint32_t> time_index;
for (auto i = 0; i < n; ++i) {
time_index.push_back(random_generators::get_int<uint32_t>());
}
Expand Down
Loading