Commit b413660
committed
PXB-3762: xtrabackup --backup --transition-key crashes when undo tablespace key exists in redo only
JIRA URL: https://perconadev.atlassian.net/browse/PXB-3762
The encryption_info keys map has two phases:
- --backup : producer. Keys are inserted from redo and dumped to
xtrabackup_keys at end-of-backup.
- --prepare : consumer. xtrabackup_keys is loaded into the map and
looked up to set up encryption on each tablespace.
xb_set_encryption() / xb_fetch_tablespace_key() are the consumer side
and must only run at prepare time. Condition 2 in
srv_undo_tablespace_read_encryption() gates this correctly with
(use_dumped_tablespace_keys && !srv_backup_mode); Condition 1 was
missing the !srv_backup_mode half.
--transition-key sets use_dumped_tablespace_keys=true in both phases,
so when redo carried an undo-encryption key newer than the on-disk
undo page, --backup entered the consumer path against an empty map
and ut_a(found) fired.
Add !srv_backup_mode to Condition 1 to match Condition 2. During
backup we now use the key already in recv_key (which is what gets
inserted into the map anyway).1 parent c6054e1 commit b413660
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
392 | 392 | | |
393 | 393 | | |
394 | 394 | | |
395 | | - | |
| 395 | + | |
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
| |||
0 commit comments