Replace the export partition local manifests lock by a multiversion container#1912
Replace the export partition local manifests lock by a multiversion container#1912arthurpassos wants to merge 13 commits into
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ef56768b4f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| std::vector<ReplicatedPartitionExportInfo> infos; | ||
| infos.reserve(snapshots.size()); | ||
| std::vector<ReplicatedPartitionExportInfo> infos(model->size()); |
There was a problem hiding this comment.
Reserve the export info vector instead of pre-sizing it
When the read model contains N exports, this constructs N default ReplicatedPartitionExportInfo rows and the loop then appends the N real rows with emplace_back. As soon as any export exists, system.replicated_partition_exports will expose extra blank rows and report twice as many entries; this should reserve capacity rather than resize the vector.
Useful? React with 👍 / 👎.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 46f5b11775
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| std::vector<ReplicatedPartitionExportInfo> infos; | ||
| infos.reserve(snapshots.size()); | ||
| std::vector<ReplicatedPartitionExportInfo> infos(model->size()); |
There was a problem hiding this comment.
Avoid pre-sizing
infos before appending rows
When there is at least one published export entry, this constructs model->size() default ReplicatedPartitionExportInfo objects and then the loop appends another row for each real entry with emplace_back. As a result, system.replicated_partition_exports returns one blank/default row per real export in addition to the correct rows, with fields like destination/table/status empty and some numeric fields default/uninitialized. This should reserve capacity instead of changing the vector size.
Useful? React with 👍 / 👎.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Yet another attempt to reduce lock contention observed while slow writes / commits to iceberg backed by
ice-rest-catalog. Uses aMultiVersioncontainer instead of locking. Follow up of #1813. Closes #1920Documentation entry for user-facing changes
...
CI/CD Options
Exclude tests:
Regression jobs to run: