Abhishek Madan
64aabc9183
Properly set smallest key of subcompaction output ( #4723 )
...
Summary:
It is possible to see a situation like the following when
subcompactions are enabled:
1. A subcompaction boundary is set to `[b, e)`.
2. The first output file in a subcompaction has `c@20` as its smallest key
3. The range tombstone `[a, d)30` is encountered.
4. The tombstone is written to the range-del meta block and the new
smallest key is set to `b@0` (since no keys in this subcompaction's
output can be smaller than `b`).
5. A key `b@10` in a lower level will now reappear, since it is not
covered by the truncated start key `b@0`.
In general, unless the smallest data key in a file has a seqnum of 0, it
is not safe to truncate a tombstone at the start key to have a seqnum of
0, since it can expose keys with a seqnum greater than 0 but less than
the tombstone's actual seqnum.
To fix this, when the lower bound of a file is from the subcompaction
boundaries, we now set the seqnum of an artificially extended smallest
key to the tombstone's seqnum. This is safe because subcompactions
operate over disjoint sets of keys, and the subcompactions that can
experience this problem are not the first subcompaction (which is
unbounded on the left).
Furthermore, there is now an assertion to detect the described anomalous
case.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/4723
Differential Revision: D13236188
Pulled By: abhimadan
fbshipit-source-id: a6da6a113f2de1e2ff307ca72e055300c8fe5692
2018-12-10 12:38:31 -08:00
..
2018-11-09 11:19:58 -08:00
2018-08-09 16:58:40 -07:00
2018-12-03 23:38:27 -08:00
2018-12-03 23:38:27 -08:00
2018-11-09 11:19:58 -08:00
2018-11-29 16:04:52 -08:00
2018-04-27 11:57:39 -07:00
2018-10-02 10:42:01 -07:00
2018-10-08 22:54:43 -07:00
2018-12-07 17:06:02 -08:00
2017-08-19 14:10:08 -07:00
2018-08-24 15:17:54 -07:00
2018-10-15 16:21:22 -07:00
2018-06-21 21:28:05 -07:00
2018-07-13 17:27:39 -07:00
2018-11-09 11:19:58 -08:00
2018-12-10 12:38:31 -08:00
2018-06-28 12:34:40 -07:00
2018-11-29 16:04:52 -08:00
2018-11-29 16:04:52 -08:00
2018-11-29 16:04:52 -08:00
2018-07-27 16:12:23 -07:00
2018-05-29 15:44:34 -07:00
2018-11-29 16:04:52 -08:00
2018-11-29 16:04:52 -08:00
2018-10-09 15:19:38 -07:00
2018-10-09 15:19:38 -07:00
2018-07-13 17:27:39 -07:00
2018-11-09 11:19:58 -08:00
2018-11-09 11:19:58 -08:00
2018-07-13 17:27:39 -07:00
2018-11-09 11:19:58 -08:00
2017-10-17 08:57:09 -07:00
2018-11-30 13:13:27 -08:00
2018-11-09 11:19:58 -08:00
2018-11-28 15:29:02 -08:00
2018-12-05 14:59:29 -08:00
2018-11-12 16:42:16 -08:00
2018-11-09 11:19:58 -08:00
2018-11-12 12:24:26 -08:00
2018-11-29 13:39:56 -08:00
2018-12-05 13:12:09 -08:00
2018-10-26 15:08:43 -07:00
2018-08-03 17:42:34 -07:00
2018-11-13 11:32:16 -08:00
2018-12-07 17:06:02 -08:00
2018-11-28 15:29:02 -08:00
2018-12-07 17:06:02 -08:00
2018-11-12 12:24:26 -08:00
2018-12-05 14:59:29 -08:00
2018-11-28 15:29:02 -08:00
2018-10-09 17:15:51 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2018-10-29 14:36:31 -07:00
2018-05-21 14:43:11 -07:00
2018-06-12 16:57:36 -07:00
2018-11-28 15:29:02 -08:00
2018-11-21 10:56:45 -08:00
2018-11-21 18:31:34 -08:00
2018-11-09 11:19:58 -08:00
2018-03-05 13:13:41 -08:00
2018-06-27 12:23:07 -07:00
2018-10-08 22:54:43 -07:00
2018-11-09 11:19:58 -08:00
2018-10-29 19:23:27 -07:00
2018-08-08 07:27:46 -07:00
2017-07-15 16:11:23 -07:00
2018-09-20 15:15:28 -07:00
2018-07-17 14:43:18 -07:00
2018-11-27 14:27:05 -08:00
2018-11-28 15:29:02 -08:00
2018-11-09 11:19:58 -08:00
2018-11-14 16:19:36 -08:00
2018-10-24 08:17:56 -07:00
2018-11-13 11:32:16 -08:00
2018-05-14 21:13:35 -07:00
2018-07-13 17:42:38 -07:00
2018-08-06 18:27:44 -07:00
2018-10-26 14:30:30 -07:00
2018-07-13 17:27:39 -07:00
2018-09-17 13:14:07 -07:00
2018-10-04 20:46:50 -07:00
2018-10-04 20:46:50 -07:00
2018-09-15 13:43:04 -07:00
2018-09-15 13:43:04 -07:00
2018-04-12 17:59:16 -07:00
2018-11-01 16:23:49 -07:00
2018-10-04 20:46:50 -07:00
2018-07-27 16:12:23 -07:00
2018-11-02 17:26:35 -07:00
2018-11-09 11:19:58 -08:00
2018-03-05 13:13:41 -08:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2018-11-09 11:19:58 -08:00
2018-11-28 15:29:02 -08:00
2018-10-15 20:01:17 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2018-07-13 17:27:39 -07:00
2018-11-28 15:29:02 -08:00
2018-03-05 13:13:41 -08:00
2018-11-05 20:24:40 -08:00
2018-11-05 20:24:40 -08:00
2018-11-09 11:19:58 -08:00
2018-10-12 18:36:11 -07:00
2018-08-24 18:13:20 -07:00
2018-11-09 11:19:58 -08:00
2018-11-09 11:19:58 -08:00
2018-11-09 11:19:58 -08:00
2018-05-14 10:57:56 -07:00
2018-11-09 11:19:58 -08:00
2018-05-03 15:43:09 -07:00
2018-05-03 15:43:09 -07:00
2018-10-12 11:50:50 -07:00
2017-07-15 16:11:23 -07:00
2018-07-13 17:27:39 -07:00
2018-11-09 11:19:58 -08:00
2018-11-28 15:29:02 -08:00
2018-11-28 15:29:02 -08:00
2018-11-28 15:29:02 -08:00
2018-11-28 15:29:02 -08:00
2018-08-16 10:58:05 -07:00
2017-07-15 16:11:23 -07:00
2018-07-12 14:42:39 -07:00
2018-09-05 18:13:31 -07:00
2017-07-15 16:11:23 -07:00
2018-11-09 11:19:58 -08:00
2018-08-03 13:57:40 -07:00
2018-07-13 17:27:39 -07:00
2018-10-17 11:19:40 -07:00
2017-07-15 16:11:23 -07:00
2018-11-09 11:19:58 -08:00
2018-04-05 11:12:16 -07:00
2018-07-13 17:27:39 -07:00
2018-11-28 15:29:02 -08:00
2018-10-09 15:19:38 -07:00
2018-11-28 15:29:02 -08:00
2018-11-28 15:29:02 -08:00
2018-11-28 15:29:02 -08:00
2018-10-24 20:16:45 -07:00
2018-10-17 11:47:34 -07:00
2018-11-28 15:29:02 -08:00
2018-11-28 15:29:02 -08:00
2018-11-28 15:29:02 -08:00
2018-06-27 12:23:07 -07:00
2018-10-12 10:41:54 -07:00
2018-11-29 11:26:41 -08:00
2018-08-23 10:12:58 -07:00
2017-07-15 16:11:23 -07:00
2018-08-06 16:57:42 -07:00
2018-11-28 15:29:02 -08:00
2018-11-21 10:56:45 -08:00
2018-11-09 11:19:58 -08:00
2018-10-30 15:34:27 -07:00
2018-10-30 15:34:27 -07:00
2018-11-09 11:19:58 -08:00
2018-11-09 11:19:58 -08:00
2018-07-27 16:12:23 -07:00
2018-09-14 19:43:04 -07:00
2018-05-21 14:43:11 -07:00
2018-08-20 14:58:00 -07:00
2018-08-20 14:58:00 -07:00
2018-08-20 14:58:00 -07:00
2018-11-09 11:19:58 -08:00
2018-11-21 11:29:57 -08:00
2018-11-21 10:56:45 -08:00
2018-11-09 11:19:58 -08:00
2018-11-09 11:19:58 -08:00
2018-01-11 18:57:33 -08:00
2017-07-15 16:11:23 -07:00
2018-06-28 18:58:29 -07:00
2018-11-28 15:29:02 -08:00
2018-11-09 11:19:58 -08:00
2018-07-13 17:27:39 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2017-07-15 16:11:23 -07:00
2018-11-07 14:07:53 -08:00
2018-10-09 22:52:40 -07:00