Skip to content

Commit 316e21d

Browse files
committed
ct: Fix pipeline_stage assertion
Previously the assertion was checking that the new stage id is less than max stage id. But this is incorrect because not all possible stages are allocated. The commit changes this so the assertion is only checking if the next stage id is allocated. Signed-off-by: Evgeny Lazin <4lazin@gmail.com>
1 parent 0062276 commit 316e21d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/v/cloud_topics/level_zero/pipeline/pipeline_stage.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pipeline_stage pipeline_stage_container::next_stage(pipeline_stage old) const {
3434
auto next_ix = old_ix + 1;
3535
// Check that we have next stage
3636
vassert(
37-
static_cast<size_t>(next_ix) < _stages.size(),
37+
static_cast<size_t>(next_ix) < _registered,
3838
"Pipeline stage {} is not registered",
3939
next_ix);
4040
return pipeline_stage(&_stages.at(next_ix));

0 commit comments

Comments
 (0)