Skip to content
/ server Public

MDEV-31344: fast status variable lookup#4751

Open
dmitry416 wants to merge 2 commits intoMariaDB:mainfrom
dmitry416:MDEV-31344
Open

MDEV-31344: fast status variable lookup#4751
dmitry416 wants to merge 2 commits intoMariaDB:mainfrom
dmitry416:MDEV-31344

Conversation

@dmitry416
Copy link

Summary

  • Added a hash table for status variables
  • Now the variable is searched first in the hash table, and if it is not found, it is searched using the old path.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@gkodinov gkodinov added the External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements. label Mar 9, 2026
Copy link
Member

@gkodinov gkodinov left a comment

Choose a reason for hiding this comment

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

Thank you for your work. This is a preliminary review.

Please make sure the buildbot servers compile and run tests successfully to completion.

Also, the whole diff needs work:

  • the hash should not be filled in only at init time. It should also be filled in when status variables array version is increased (e.g. load a plugin etc).
  • hash access should be protected under LOCK_all_status_vars.
  • you need a test that covers the change as much as possible.
  • to be able to test you might need some new status variable counters to observe the hash usage vs scans.

I would start with an exact design document of what the diff is trying to do. Then I'd add regression test to ensure that all the functional and non-functional requirements are tested. And then compare the implementation to the design spec and the tests and make sure it delivers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements.

Development

Successfully merging this pull request may close these issues.

3 participants