Skip to content

Cherry pick #80247 to 25.4: Reduce lock contention in QueryConditionCache#81853

Merged
robot-ch-test-poll2 merged 3 commits intobackport/25.4/80247from
cherrypick/25.4/80247
Jun 14, 2025
Merged

Cherry pick #80247 to 25.4: Reduce lock contention in QueryConditionCache#81853
robot-ch-test-poll2 merged 3 commits intobackport/25.4/80247from
cherrypick/25.4/80247

Conversation

@robot-ch-test-poll2
Copy link
Copy Markdown
Contributor

Original pull-request #80247

This pull-request is a first step of an automated backporting.
It contains changes similar to calling git cherry-pick locally.
If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.

The check results does not matter at this step - you can safely ignore them.

Note

This pull-request will be merged automatically. Please, do not merge it manually (but if you accidentally did, nothing bad will happen).

Troubleshooting

If the PR was manually reopened after being closed

If this PR is stuck (i.e. not automatically merged after one day), check #80247 for pr-backports-created label and delete it.

Manually merging will do nothing. The pr-backports-created label prevents the original PR #80247 from being processed.

If the conflicts were resolved in a wrong way

If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:

  • delete the pr-cherrypick label from the PR
  • delete this branch from the repository

You also need to check the original PR #80247 for pr-backports-created, and delete if it's presented there

The PR source

The PR is created in the CI job

jiebinn and others added 3 commits May 15, 2025 02:44
…ached

query conditions need to be updated based on changes to underlying data or
configuration. This improves query performance by avoiding unnecessary cache
rebuilds while ensuring data consistency when conditions change. The method
also helps reduce unnecessary lock contention, improving concurrency in
multi-threaded query environments.

Performance improvements:
- Reduces the "native_queued_spin_lock_slowpath" hotspot of entry->mutex
  from 76% to 1% with Clickbench Q10 on a 2 x 240 vCPUs system
- Increases QPS for Q10 and Q11 by 85% and 89% respectively
- Improves overall performance across 43 queries with a geometric mean gain
  of 8.1%

Signed-off-by: Jiebin Sun <jiebin.sun@intel.com>
Reviewed-by: Wangyang Guo <wangyang.guo@intel.com>
Reduce lock contention in QueryConditionCache
@robot-ch-test-poll2 robot-ch-test-poll2 added pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only! do not test disable testing on pull request labels Jun 14, 2025
@robot-ch-test-poll2 robot-ch-test-poll2 merged commit 0a22c47 into backport/25.4/80247 Jun 14, 2025
127 of 131 checks passed
@robot-ch-test-poll2 robot-ch-test-poll2 deleted the cherrypick/25.4/80247 branch June 14, 2025 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not test disable testing on pull request pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants