Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Minor cleanup of the code handling the shared memory cache for principal keys #409

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

Merged
merged 2 commits into from
Jun 10, 2025

Conversation

jeltz
Copy link
Collaborator

@jeltz jeltz commented Jun 10, 2025

This changes the case of the name of the get_principal_key_hash() function plus makes our use of an explicitly inlined function sane. Before this the inlined function always had to call the non-inlined one defeating the entire purpose. Of course there is a good argument for just removing this cleverness because it is a not that performance critical path plus that everything is static functions so the compiler should be able to do a good enough job even without explicit inline.

jeltz added 2 commits June 10, 2025 11:00
There was no point in having the function for attaching the the shared
memory hash table be inline if the non-inlined code had to be called
every time anyway. We still maybe should just stop using an explicit
inline since this is unlikely to be that performace critical code but at
least if we use it we should use it correctly.
There was no good reason to have an upper case H.
@jeltz jeltz requested review from dutow and dAdAbird as code owners June 10, 2025 09:14
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.50%. Comparing base (27d05dd) to head (b30d998).
Report is 2 commits behind head on TDE_REL_17_STABLE.

❌ Your project status has failed because the head coverage (85.50%) is below the target coverage (90.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@                  Coverage Diff                  @@
##           TDE_REL_17_STABLE     #409      +/-   ##
=====================================================
- Coverage              85.55%   85.50%   -0.05%     
=====================================================
  Files                     22       22              
  Lines                   2547     2546       -1     
  Branches                 388      388              
=====================================================
- Hits                    2179     2177       -2     
- Misses                   292      293       +1     
  Partials                  76       76              
Components Coverage Δ
access 83.73% <ø> (ø)
catalog 88.88% <100.00%> (-0.02%) ⬇️
common 91.80% <ø> (ø)
encryption 72.56% <ø> (-0.89%) ⬇️
keyring 72.94% <ø> (ø)
src 91.42% <ø> (ø)
smgr 94.85% <ø> (ø)
transam ∅ <ø> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@AndersAstrand AndersAstrand left a comment

Choose a reason for hiding this comment

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

Regarding commit 1, I think we should probably just not be clever here, but it's better than it was!

The second commit though. That's hilarious. It's neither Title_Case nor snake_case. It's a little of both! Nice find 😆

@jeltz jeltz merged commit 8084e6a into percona:TDE_REL_17_STABLE Jun 10, 2025
16 of 17 checks passed
@jeltz jeltz deleted the tde/clean-shmem-hash branch June 13, 2025 12:40
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.

3 participants