Cheng Chang
3dd5bc2a25
Make it able to ignore WAL related VersionEdits in older versions ( #7873 )
...
Summary:
Although the tags for `WalAddition`, `WalDeletion` are after `kTagSafeIgnoreMask`, to actually be able to skip these entries in older versions of RocksDB, we require that they are encoded with their encoded size as the prefix. This requirement is not met in the current codebase, so a downgraded DB may fail to open if these entries exist in the MANIFEST.
If a DB wants to downgrade, and its MANIFEST contains `WalAddition` or `WalDeletion`, it can set `track_and_verify_wals_in_manifest` to `false`, then restart twice, then downgrade. On the first restart, a new MANIFEST will be created with a `WalDeletion` indicating that all previously tracked WALs are removed from MANIFEST. On the second restart, since there is no tracked WALs in MANIFEST now, a new MANIFEST will be created with neither `WalAddition` nor `WalDeletion`. Then the DB can downgrade.
Tags for `BlobFileAddition`, `BlobFileGarbage` also have the same problem, but this PR focuses on solving the problem for WAL edits.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/7873
Test Plan: Added a `VersionEditTest::IgnorableTags` unit test to verify all entries with tags larger than `kTagSafeIgnoreMask` can actually be skipped and won't affect parsing of other entries.
Reviewed By: ajkr
Differential Revision: D25935930
Pulled By: cheng-chang
fbshipit-source-id: 7a02fdba4311d6084328c14aed110a26d08c3efb
2021-01-20 08:35:30 -08:00
..
2021-01-06 10:49:32 -08:00
2021-01-06 14:15:02 -08:00
2021-01-11 15:01:52 -08:00
2020-12-04 21:29:38 -08:00
2020-12-04 21:29:38 -08:00
2020-11-12 18:44:34 -08:00
2020-11-12 18:44:34 -08:00
2021-01-06 14:15:02 -08:00
2021-01-06 14:15:02 -08:00
2021-01-15 16:56:41 -08:00
2020-12-23 16:55:53 -08:00
2020-12-18 21:34:36 -08:00
2020-12-22 23:45:58 -08:00
2020-10-01 19:14:14 -07:00
2020-12-22 14:53:43 -08:00
2020-10-28 23:22:27 -07:00
2020-05-12 18:23:33 -07:00
2020-12-23 16:55:53 -08:00
2020-12-22 23:45:58 -08:00
2021-01-06 10:49:32 -08:00
2020-12-09 21:21:16 -08:00
2020-12-22 23:45:58 -08:00
2021-01-06 14:15:02 -08:00
2021-01-06 14:15:02 -08:00
2021-01-06 14:15:02 -08:00
2021-01-09 09:44:34 -08:00
2020-09-10 22:35:25 -07:00
2020-12-03 19:22:24 -08:00
2020-10-22 17:06:20 -07:00
2020-06-15 10:47:02 -07:00
2020-08-17 18:42:25 -07:00
2021-01-06 14:15:02 -08:00
2020-12-04 21:29:38 -08:00
2020-12-22 23:45:58 -08:00
2020-12-09 21:21:16 -08:00
2020-12-04 21:29:38 -08:00
2020-12-08 15:55:04 -08:00
2020-12-22 23:45:58 -08:00
2020-12-09 21:21:16 -08:00
2020-12-08 15:55:04 -08:00
2020-12-08 15:55:04 -08:00
2020-12-08 15:55:04 -08:00
2021-01-11 10:17:57 -08:00
2020-10-27 10:33:09 -07:00
2020-12-22 15:09:39 -08:00
2021-01-11 15:01:52 -08:00
2020-12-22 23:45:58 -08:00
2020-12-22 23:45:58 -08:00
2021-01-06 14:15:02 -08:00
2021-01-09 09:44:34 -08:00
2021-01-06 14:15:02 -08:00
2021-01-06 14:15:02 -08:00
2021-01-06 14:15:02 -08:00
2020-12-23 16:55:53 -08:00
2021-01-09 09:44:34 -08:00
2021-01-06 14:15:02 -08:00
2020-08-17 18:42:25 -07:00
2020-12-22 15:09:39 -08:00
2020-10-28 23:22:27 -07:00
2020-12-02 13:00:53 -08:00
2020-12-02 13:00:53 -08:00
2020-12-22 15:09:39 -08:00
2021-01-07 16:31:33 -08:00
2021-01-07 16:31:33 -08:00
2020-12-07 20:11:35 -08:00
2021-01-06 14:15:02 -08:00
2020-08-25 10:46:11 -07:00
2020-02-20 12:09:57 -08:00
2020-12-09 21:21:16 -08:00
2020-12-26 22:07:24 -08:00
2020-08-18 16:20:54 -07:00
2020-12-22 15:09:39 -08:00
2020-12-22 23:45:58 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-10-28 23:22:27 -07:00
2021-01-06 10:49:32 -08:00
2020-12-02 09:31:14 -08:00
2020-12-02 09:31:14 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-12-22 23:45:58 -08:00
2020-04-15 17:40:44 -07:00
2020-10-28 10:12:58 -07:00
2020-08-18 16:20:54 -07:00
2020-12-23 16:55:53 -08:00
2020-12-19 08:00:14 -08:00
2020-12-19 08:00:14 -08:00
2020-05-04 15:08:13 -07:00
2020-12-22 23:45:58 -08:00
2020-02-20 12:09:57 -08:00
2020-11-30 18:11:38 -08:00
2020-08-26 10:39:20 -07:00
2021-01-04 16:01:01 -08:00
2020-12-23 16:55:53 -08:00
2020-03-27 16:04:43 -07:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-12-22 23:45:58 -08:00
2020-12-23 16:55:53 -08:00
2020-12-14 13:48:22 -08:00
2020-12-14 13:48:22 -08:00
2020-12-14 13:48:22 -08:00
2020-12-14 13:48:22 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-10-28 10:12:58 -07:00
2020-10-28 10:12:58 -07:00
2020-02-20 12:09:57 -08:00
2020-12-22 15:09:39 -08:00
2020-12-22 23:45:58 -08:00
2020-12-23 16:55:53 -08:00
2020-11-10 23:42:13 -08:00
2020-11-10 23:42:13 -08:00
2020-12-22 23:45:58 -08:00
2020-12-22 23:45:58 -08:00
2020-10-28 23:22:27 -07:00
2020-10-01 19:14:14 -07:00
2020-02-20 12:09:57 -08:00
2021-01-04 16:01:01 -08:00
2020-02-20 12:09:57 -08:00
2020-12-23 16:55:53 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-10-28 10:12:58 -07:00
2020-10-28 10:12:58 -07:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-08-14 19:20:58 -07:00
2021-01-06 10:49:32 -08:00
2021-01-06 10:49:32 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-11-03 09:45:41 -08:00
2020-08-27 11:21:52 -07:00
2021-01-04 16:01:01 -08:00
2020-10-28 10:12:58 -07:00
2020-02-20 12:09:57 -08:00
2020-12-22 23:45:58 -08:00
2020-08-12 17:31:23 -07:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-10-28 23:22:27 -07:00
2020-12-14 14:07:52 -08:00
2020-06-09 16:51:23 -07:00
2021-01-07 15:22:53 -08:00
2020-11-11 08:00:14 -08:00
2021-01-20 08:35:30 -08:00
2021-01-20 08:35:30 -08:00
2021-01-20 08:35:30 -08:00
2020-12-22 23:45:58 -08:00
2020-12-14 13:48:22 -08:00
2020-12-18 21:34:36 -08:00
2020-12-09 16:02:12 -08:00
2020-12-09 16:02:12 -08:00
2020-12-09 16:02:12 -08:00
2021-01-06 10:49:32 -08:00
2020-12-22 23:45:58 -08:00
2020-08-12 17:31:23 -07:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-12-08 15:55:04 -08:00
2020-11-23 16:29:04 -08:00
2020-12-22 23:45:58 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-12-09 21:21:16 -08:00
2020-10-14 10:47:58 -07:00