-
Notifications
You must be signed in to change notification settings - Fork 678
ct/l1: erase partition when removing last object leaves it empty #27717
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a bug where removing the last object from a metastore partition would leave behind empty partition metadata in the builder. This caused failures when add_objects()
encountered empty partitions that still expected term routing information.
Key changes:
- Added logic to clean up empty partitions when the last object is removed from a builder
- Added regression test to verify the fix
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
src/v/cloud_topics/level_one/metastore/replicated_metastore.cc |
Adds partition cleanup logic when removing the last object leaves partition empty |
src/v/cloud_topics/level_one/metastore/tests/replicated_metastore_test.cc |
Adds regression test that reproduces and verifies fix for empty partition cleanup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks
We were previously leaving behind empty partitions in the builder. This meant that after a bad object is removed from the builder, the call to replicated_metastore::add_objects() would examine the empty set of objects meant for a given metastore partition, and expect there to be terms routed for that partition. This resulted in the following error: ERROR 2025-09-24 06:14:38,875 [shard 0:main] cloud_topics - replicated_metastore.cc:320 - No term metadata routed to partition 1
0b4e538
d2387f6
to
0b4e538
Compare
Force pushed to rebase and pass the object builder by const ref |
Retry command for Build#72906please wait until all jobs are finished before running the slash command
|
CI test resultstest results on build#72902
test results on build#72906
|
We were previously leaving behind empty partitions in the builder. This meant that after a bad object is removed from the builder, the call to replicated_metastore::add_objects() would examine the empty set of objects meant for a given metastore partition, and expect there to be terms routed for that partition. This resulted in the following error:
ERROR 2025-09-24 06:14:38,875 [shard 0:main] cloud_topics - replicated_metastore.cc:320 - No term metadata routed to partition 1
Backports Required
Release Notes