[trunk] PXB-3571 : --transition-key does not save keys with --lock-ddl=reduced - #1687
Merged
Merged
Conversation
Problem: -------- If --transition-key is used with reduced lock backups (--lock-ddl=reduced), it doesn't save the tablespace encryption key of all tablespaces. This is because, as part of reduced lock, we close all tablespaces and re-open only the tablespaces that are involved in DDLs. See handle_ddl_operations(). Later, we iterate over the in-memory list of tablespaces and save the keys. Since the DDL tracker closed and removed all the tablespaces, it will now save only the keys of tablespaces opened by DDL tracker. Fix: ---- We now divide the tablespace keys into multiple stages. The old xb_tablespace_keys_dump() is now refactored to TablespaceKeyDumper and functionality is split as below: 1. Saving keys from in-memory list: This is split into two phases. We do once before tablespaces are removed from cache. And again, at the end for the new tablespace discovered by reduced lock. This is dump_from_spaces() 2. Saving keys from redo: This can be done only after redo thread is stopped. So it is done at end. This is dump_from_redo(). 3. Saving keys from encryption_infos. This encryption_infos contains the keys discovered for encrypted redo log. This is done as usual at end. The function that does this is dump_from_encryption_infos()
satya-bodapati
force-pushed
the
PXB-trunk-3571
branch
from
July 31, 2025 11:56
fdb387e to
5c23df3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.