Skip to content

[VQueues] Remove use of vobj_status on invoke path#4740

Open
AhmedSoliman wants to merge 3 commits into
mainfrom
pr4740
Open

[VQueues] Remove use of vobj_status on invoke path#4740
AhmedSoliman wants to merge 3 commits into
mainfrom
pr4740

Conversation

@AhmedSoliman
Copy link
Copy Markdown
Contributor

@AhmedSoliman AhmedSoliman commented May 14, 2026

Throughput of "invoke" workload improves 9k/s -> ~11k/s (the relative numbers are what matters here)

The assumption is that we will perform a one-shot migration of data in this table that has a value
as part of the VQ migration pack.


Stack created with Sapling. Best reviewed with ReviewStack.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 14, 2026

Test Results

  8 files  ±0    8 suites  ±0   4m 56s ⏱️ +6s
 60 tests ±0   60 ✅ ±0  0 💤 ±0  0 ❌ ±0 
267 runs  ±0  267 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 86a4dbe. ± Comparison against base commit 9da7b1a.

♻️ This comment has been updated with latest results.

@AhmedSoliman AhmedSoliman force-pushed the pr4740 branch 3 times, most recently from b419140 to e557a1b Compare May 15, 2026 15:13
@AhmedSoliman AhmedSoliman changed the title [VQueues][Perf][1/N] Remove use of vobj_status on invoke path [VQueues] Remove use of vobj_status on invoke path May 18, 2026
@AhmedSoliman AhmedSoliman force-pushed the pr4740 branch 4 times, most recently from c05822f to 31b234a Compare May 18, 2026 12:37
…l merges

Partial merges didn't add value and wasted precious CPU cycles since the updates cannot be merged
This change removes it and increase the limit of successive merges from 100 (way too low for vqueus) to 5000100 (way too low for vqueus) to 5000
which experimentally seems to be enough, but we may expose this as an advanced config option in the future if really needed.
Improves decoding throughput of successive vqueue meta merge updates by ~45% as shows in the benchmark:

```console
vqueue_meta_merge/full_merge_10000_operands
                        time:   [200.41 µs 201.33 µs 202.22 µs]
                        thrpt:  [49.451 Melem/s 49.670 Melem/s 49.897 Melem/s]
                 change:
                        time:   [-29.998% -29.504% -28.958%] (p = 0.00 < 0.05)
                        thrpt:  [+40.761% +41.852% +42.853%]
                        Performance has improved.
```
Throughput of "invoke" workload improves 9k/s -> ~11k/s (the relative numbers are what matters here)

The assumption is that we will perform a one-shot migration of data in this table that has a value
as part of the VQ migration pack.
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 86a4dbe67c

ℹ️ 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".

Comment on lines +128 to +131
let mut update = <vqueue_table::metadata::Update as bilrost::encoding::RawMessage>::empty();
for op in operands {
let batch = match VQueueMetaUpdates::decode(op) {
Err(err) => {
let key = MetaKey::deserialize_from(&mut key);
error!(
?err,
?key,
"[full merge] Failed to decode vqueue meta batched updates ({} bytes)",
op.len(),
);
return None;
}
Ok(batch) => batch,
};
for update in batch.updates.iter() {
vqueue_meta.apply_update(update);
if let Err(err) = update.replace_from_slice(op) {
let key = MetaKey::deserialize_from(&mut key);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Handle legacy vqueue meta operands during full merge

full_merge_slices now decodes every merge operand as a single Update, but pre-upgrade data was written as VQueueMetaUpdates batches. During a rolling upgrade (or after restart with existing SST/memtable merge records), those legacy operands will not be interpreted correctly by this path, so queued metadata updates can be dropped or the merge can fail, leaving vqueue counters/stats inconsistent. Please add a compatibility decode path for the old operand format before applying updates.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

@tillrohrmann tillrohrmann left a comment

Choose a reason for hiding this comment

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

LGTM. +1 for merging if the failing tests are unrelated.

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.

2 participants