Yanqin Jin
6595267980
Allow compaction iterator to perform garbage collection ( #7556 )
...
Summary:
Add a threshold timestamp, full_history_ts_low_ of type `std::string*` to
`CompactionIterator`, so that RocksDB can also perform garbage collection during
compaction.
* If full_history_ts_low_ is nullptr, then compaction iterator does not perform
GC, preserving all timestamp history for all keys. Compaction iterator will
treat user key with different timestamps as different user keys.
* If full_history_ts_low_ is not nullptr, then compaction iterator performs
GC. GC will look at keys older than `*full_history_ts_low_` and determine their
eligibility based on factors including snapshots.
Current rules of GC:
* If an internal key is in the same snapshot as a previous counterpart
with the same user key, and this key is eligible for GC, and the key is
not single-delete or merge operand, then this key can be dropped. Note
that the previous internal key cannot be a merge operand either.
* If a tombstone is the most recent one in the earliest snapshot and it
is eligible for GC, and keyNotExistsBeyondLevel() is true, then this
tombstone can be dropped.
* If a tombstone is the most recent one in a snapshot and it is eligible
for GC, and the compaction is at bottommost level, then all other older
internal keys of the same user key must also be eligible for GC, thus
can be dropped
* Single-delete, delete-range and merge are not currently supported.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/7556
Test Plan: make check
Reviewed By: ltamasi
Differential Revision: D24507728
Pulled By: riversand963
fbshipit-source-id: 3c09c7301f41eed76dfcf4d1527e68cf6e0a8bb3
2020-10-23 22:59:46 -07:00
..
2020-10-15 13:04:47 -07:00
2020-10-23 22:59:46 -07:00
2020-10-23 22:49:51 -07:00
2020-08-03 15:23:04 -07:00
2020-08-03 15:23:04 -07:00
2020-10-02 22:11:00 -07:00
2020-09-14 21:11:43 -07:00
2020-10-16 11:04:01 -07:00
2020-10-16 11:04:01 -07:00
2020-10-22 17:06:20 -07:00
2020-10-15 13:04:47 -07:00
2020-10-15 13:04:47 -07:00
2020-07-02 19:25:41 -07:00
2020-10-01 19:14:14 -07:00
2020-02-20 12:09:57 -08:00
2020-07-09 14:35:17 -07:00
2020-05-12 18:23:33 -07:00
2020-10-22 17:06:20 -07:00
2020-07-02 19:25:41 -07:00
2020-10-22 17:06:20 -07:00
2020-10-11 14:58:24 -07:00
2020-09-14 17:01:01 -07:00
2020-09-30 19:16:47 -07:00
2020-10-07 13:19:31 -07:00
2020-10-19 11:38:48 -07:00
2020-08-17 18:42:25 -07:00
2020-09-10 22:35:25 -07:00
2020-10-15 13:04:47 -07: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
2020-08-17 18:42:25 -07:00
2020-06-24 16:22:49 -07:00
2020-09-30 19:16:47 -07:00
2020-10-23 22:59:46 -07:00
2020-09-29 09:49:04 -07:00
2020-09-14 17:01:01 -07:00
2020-08-17 18:42:25 -07:00
2020-03-20 15:26:10 -07:00
2020-08-17 18:42:25 -07:00
2020-08-17 18:42:25 -07:00
2020-08-17 18:42:25 -07:00
2020-10-09 16:42:19 -07:00
2020-10-01 17:47:09 -07:00
2020-08-17 18:42:25 -07:00
2020-09-29 16:30:08 -07:00
2020-09-04 23:25:03 -07:00
2020-10-19 11:38:48 -07:00
2020-08-17 18:42:25 -07:00
2020-10-22 17:06:20 -07:00
2020-10-06 14:42:12 -07:00
2020-09-29 16:30:08 -07:00
2020-10-01 10:42:58 -07:00
2020-10-06 14:42:12 -07:00
2020-10-20 11:50:30 -07:00
2020-09-30 19:16:47 -07:00
2020-08-17 18:42:25 -07:00
2020-10-06 12:44:20 -07:00
2020-09-30 19:16:47 -07:00
2020-09-30 19:16:47 -07:00
2020-10-23 22:59:46 -07:00
2020-10-22 17:06:20 -07:00
2020-10-02 16:41:13 -07:00
2020-09-29 18:23:27 -07:00
2020-09-17 20:25:45 -07:00
2020-10-02 16:41:13 -07:00
2020-08-25 10:46:11 -07:00
2020-02-20 12:09:57 -08:00
2020-08-17 18:42:25 -07:00
2020-09-30 19:16:47 -07:00
2020-08-18 16:20:54 -07:00
2020-08-24 11:26:09 -07:00
2020-07-09 14:35:17 -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-10-22 17:06:20 -07:00
2020-10-01 10:10:26 -07:00
2020-09-28 14:59:02 -07:00
2020-09-08 10:56:08 -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-10-21 20:18:06 -07:00
2020-04-15 17:40:44 -07:00
2020-09-30 19:16:47 -07:00
2020-08-18 16:20:54 -07:00
2020-10-08 11:22:44 -07:00
2020-10-07 15:44:53 -07:00
2020-10-15 13:04:47 -07:00
2020-05-04 15:08:13 -07:00
2020-09-14 17:01:01 -07:00
2020-02-20 12:09:57 -08:00
2020-08-26 10:39:20 -07:00
2020-08-26 10:39:20 -07:00
2020-06-03 15:55:03 -07:00
2020-06-18 10:09:12 -07: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-03-04 20:15:25 -08:00
2020-09-24 21:48:57 -07:00
2020-09-14 21:11:43 -07:00
2020-08-21 13:29:05 -07:00
2020-10-01 10:10:26 -07:00
2020-09-29 23:17:45 -07:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-09-30 19:16:47 -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-10-22 17:06:20 -07:00
2020-09-16 15:48:07 -07:00
2020-10-01 10:10:26 -07:00
2020-10-01 10:10:26 -07:00
2020-10-01 09:23:04 -07:00
2020-10-01 19:14:14 -07:00
2020-10-01 19:14:14 -07:00
2020-10-01 19:14:14 -07:00
2020-02-20 12:09:57 -08:00
2020-10-13 12:00:09 -07:00
2020-02-20 12:09:57 -08:00
2020-10-02 17:01:15 -07:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-09-30 19:16:47 -07:00
2020-09-30 19:16:47 -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
2020-09-29 16:30:08 -07:00
2020-10-22 17:06:20 -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-10-01 17:47:09 -07:00
2020-08-27 11:21:52 -07:00
2020-09-14 17:01:01 -07:00
2020-09-30 19:16:47 -07:00
2020-02-20 12:09:57 -08:00
2020-08-18 16:20:54 -07: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-09-28 12:12:40 -07:00
2020-10-02 22:11:00 -07:00
2020-06-09 16:51:23 -07:00
2020-10-23 22:49:51 -07:00
2020-10-23 22:49:51 -07:00
2020-10-23 22:49:51 -07:00
2020-09-14 21:11:43 -07:00
2020-10-23 22:49:51 -07:00
2020-10-23 22:49:51 -07:00
2020-10-23 22:49:51 -07:00
2020-10-23 22:49:51 -07:00
2020-10-23 22:49:51 -07:00
2020-10-23 22:49:51 -07:00
2020-10-23 22:49:51 -07:00
2020-10-22 17:06:20 -07:00
2020-10-22 17:06:20 -07: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-20 13:18:41 -07:00
2020-10-20 13:18:41 -07:00
2020-06-30 12:31:30 -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-10-06 12:44:20 -07:00
2020-10-14 10:47:58 -07:00