-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#3520] DocDB: Fix PITR in conjunctions with packed rows
Summary: This diff fixes the following issues related to PITR and packed rows. 1) Support reading pg catalog version from packed row. 2) Ignore tombstoned column updates during read and compaction of pgsql tables. When patching pg catalog version we pick max version from all entries present in existing state, add 1 to it and add to write batch after all other entries. The following cases are possible: (1) Restoring state: `doc_key => (restoring_version1, last_breaking_version1)` Existing state: `doc_key => (existing_version1, last_breaking_version2)` Here we will just pick existing_version1 as max found version. (2) Restoring state: `doc_key => (restoring_version1, last_breaking_version1)` `doc_key, column_id("current_version") => restoring_version2` Exiting state: `doc_key => (existing_version1, last_breaking_version2)` The same as above, with exception that entry for restoring_version2 will also be added. But with lower write id, since we put patched pg catalog version after iteration. (3) Restoring state: `doc_key => (restoring_version1, last_breaking_version1)` Exiting state: `doc_key => (existing_version1, last_breaking_version2)` `doc_key, column_id("current_version") => existing_version1` The max of existing_version2 and existing_version3 will be used. Also updated FetchState to handle packed rows by maintaining key value stack. Test Plan: YbAdminSnapshotScheduleTest.PgsqlDropDefaultWithPackedRow Reviewers: mbautin, skedia Reviewed By: mbautin, skedia Subscribers: zdrudi, timur, ybase, bogdan Differential Revision: https://phabricator.dev.yugabyte.com/D17834
- Loading branch information
Showing
14 changed files
with
356 additions
and
206 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.