Skip to content

Conversation

jeltz
Copy link
Collaborator

@jeltz jeltz commented Aug 19, 2025

There was a race condition in the WAL archiving tests where if the end-of-recovery checkpoint had completed the tests for the WAL contents were non-sensical and racy. Solve this by explicilty promoting the server first after we have looked at the WAL contents but still making sure to wait until all WAL has been replayed.

Additionally improve the tests by actually making sure the replica starts in a good state where all WAL is encrypted and testing both the plaintext and the encrypted scenarios.

@codecov-commenter
Copy link

codecov-commenter commented Aug 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.40%. Comparing base (80e0bb0) to head (42bee14).

❌ Your project status has failed because the head coverage (82.40%) 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     #545   +/-   ##
==================================================
  Coverage              82.40%   82.40%           
==================================================
  Files                     25       25           
  Lines                   3229     3229           
  Branches                 510      510           
==================================================
  Hits                    2661     2661           
  Misses                   457      457           
  Partials                 111      111           
Components Coverage Δ
access 84.37% <ø> (ø)
catalog 87.65% <ø> (ø)
common 77.77% <ø> (ø)
encryption 72.97% <ø> (ø)
keyring 73.21% <ø> (ø)
src 94.18% <ø> (ø)
smgr 96.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/archiving-test-race branch from 5975865 to ee33802 Compare August 19, 2025 13:09
Copy link
Member

@dAdAbird dAdAbird left a comment

Choose a reason for hiding this comment

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

LGTM, tests passed on my machine and CI seems to be working as well.

I have a comment on some leftovers though.

Comment on lines 145 to 150
#$replica_plain->promote;
#
#$result = $replica_plain->safe_psql('postgres',
# 'SELECT * FROM t1 UNION ALL SELECT * FROM t2');
#
#is($result, "foobar_plain\nfoobar_enc", 'b');
Copy link
Member

Choose a reason for hiding this comment

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

do we need this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, it was only commented out temporarily while testing ...

There was a race condition in the WAL archiving tests where if the
end-of-recovery checkpoint had completed the tests for the WAL contents
were non-sensical and racy. Solve this by explicilty promoting the
server first after we have looked at the WAL contents but still making
sure to wait until all WAL has been replayed.

Additionally improve the tests by actually making sure the replica
starts in a good state where all WAL is encrypted and testing both
the plaintext and the encrypted scenarios.
@jeltz jeltz force-pushed the tde/archiving-test-race branch from ee33802 to 42bee14 Compare August 19, 2025 14:19
@jeltz jeltz merged commit 6df714b into percona:TDE_REL_17_STABLE Aug 19, 2025
18 checks passed
@jeltz jeltz deleted the tde/archiving-test-race branch August 19, 2025 14:45
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