Skip to content

Fix broken reuse of deleted entries in key map file #239

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
Apr 22, 2025

Conversation

jeltz
Copy link
Collaborator

@jeltz jeltz commented Apr 19, 2025

Since we tried to check if flags & MAP_ENTRY_EMPTY was true when searching for empty entries the code was broken since x & 0 always is false. We fix this by refactoring pg_tde_read_one_map_entry() so the filtering of the entries is done outside the function. This make implementing search for empty entries much easier.

@jeltz jeltz requested review from dutow and dAdAbird as code owners April 19, 2025 03:33
@jeltz jeltz force-pushed the tde/broken-resuse-empty branch from ffa8928 to 4a63df7 Compare April 19, 2025 09:29
@codecov-commenter
Copy link

codecov-commenter commented Apr 19, 2025

Codecov Report

Attention: Patch coverage is 85.71429% with 3 lines in your changes missing coverage. Please review.

Project coverage is 76.06%. Comparing base (a6f774e) to head (2cf9f20).

❌ Your project status has failed because the head coverage (76.06%) 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     #239      +/-   ##
=====================================================
- Coverage              76.17%   76.06%   -0.11%     
=====================================================
  Files                     22       22              
  Lines                   2455     2448       -7     
  Branches                 383      384       +1     
=====================================================
- Hits                    1870     1862       -8     
- Misses                   511      513       +2     
+ Partials                  74       73       -1     
Components Coverage Δ
access 72.41% <85.71%> (-0.50%) ⬇️
catalog 86.24% <ø> (ø)
common 92.50% <ø> (ø)
encryption 71.90% <ø> (ø)
keyring 69.87% <ø> (ø)
src 52.80% <ø> (ø)
smgr 96.93% <ø> (ø)
transam ∅ <ø> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jeltz jeltz force-pushed the tde/broken-resuse-empty branch from 4a63df7 to bbab5f4 Compare April 20, 2025 18:51
jeltz added 2 commits April 22, 2025 13:04
Since we tried to check if flags & MAP_ENTRY_EMPTY was true when
searching for empty entries the code was broken since x & 0 always is
false. We fix this by refactoring pg_tde_read_one_map_entry() so the
filtering of the entries is done outside the function. This make
implementing search for empty entries much easier.
Now that pg_tde_read_one_map_entry() is simpler it makes sense to also
simplify the pg_tde_find_map_entry() function.
@jeltz jeltz force-pushed the tde/broken-resuse-empty branch from bbab5f4 to 2cf9f20 Compare April 22, 2025 11:04
@jeltz jeltz merged commit 6f1bb54 into percona:TDE_REL_17_STABLE Apr 22, 2025
22 checks passed
@jeltz jeltz deleted the tde/broken-resuse-empty branch April 22, 2025 17:07
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