Skip to content

Conversation

jeltz
Copy link
Collaborator

@jeltz jeltz commented Aug 13, 2025

Instead of first deleting any leftover key and then writing the new key we do a single pass through the file where we replace any old key that we find. To make this happen on redo too we need to stop generating a separate WAL record for the key deletion for encrypted tables and only generate that record for unencrypted tables where we still need a key deletion record.

We except this optimization to primarily be visible on WAL replay where only a single backend is used to replay everything, but it also speeds up table creation in general on workloads with many tables.

@codecov-commenter
Copy link

codecov-commenter commented Aug 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.22%. Comparing base (13c1038) to head (d94c696).

❌ Your project status has failed because the head coverage (82.22%) 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     #529      +/-   ##
=====================================================
+ Coverage              82.21%   82.22%   +0.01%     
=====================================================
  Files                     25       25              
  Lines                   3177     3179       +2     
  Branches                 516      517       +1     
=====================================================
+ Hits                    2612     2614       +2     
+ Misses                   456      455       -1     
- Partials                 109      110       +1     
Components Coverage Δ
access 83.42% <100.00%> (-0.05%) ⬇️
catalog 87.60% <ø> (ø)
common 77.77% <ø> (ø)
encryption 72.97% <ø> (ø)
keyring 73.21% <ø> (ø)
src 94.15% <ø> (ø)
smgr 95.90% <100.00%> (+0.53%) ⬆️
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/optimize-wal-replay-4 branch from a907a2a to 3c91817 Compare August 13, 2025 07:55
Instead of first deleting any leftover key and then writing the new key
we do a single pass through the file where we replace any old key that
we find. To make this happen on redo too we need to stop generating a
separate WAL record for the key deletion for encrypted tables and only
generate that record for unencrypted tables where we still need a key
deletion record.

We except this optimization to primarily be visible on WAL replay where
only a single backend is used to replay everything, but it also speeds
up table creation in general on workloads with many tables.
@jeltz jeltz force-pushed the tde/optimize-wal-replay-4 branch from 3c91817 to d94c696 Compare August 13, 2025 07:56
@jeltz jeltz merged commit 2d91a89 into percona:TDE_REL_17_STABLE Aug 13, 2025
18 checks passed
@jeltz jeltz mentioned this pull request Aug 13, 2025
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