]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
Consider all compaction input files to compute the oldest ancestor time (#6279)
authorSagar Vemuri <svemuri@fb.com>
Sat, 11 Jan 2020 03:01:00 +0000 (19:01 -0800)
committerSagar Vemuri <svemuri@fb.com>
Mon, 13 Jan 2020 20:20:11 +0000 (12:20 -0800)
commit4df4e63ee671f5ca0efabc98ce0778dd591c64db
tree5ada990f1e19334cc07c01460c30d533e7f037e8
parentbeca3c9a414bcb2d6eeb9f271ad74a74718e9dd4
Consider all compaction input files to compute the oldest ancestor time (#6279)

Summary:
Look at all compaction input files to compute the oldest ancestor time.

In https://github.com/facebook/rocksdb/issues/5992 we changed how creation_time (aka oldest-ancestor-time) table property of compaction output files is computed from max(creation-time-of-all-compaction-inputs) to min(creation-time-of-all-inputs). This exposed a bug where, during compaction, the creation_time:s of only the L0 compaction inputs were being looked at, and all other input levels were being ignored. This PR fixes the issue.
Some TTL compactions when using Level-Style compactions might not have run due to this bug.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/6279

Test Plan: Enhanced the unit tests to validate that the correct time is propagated to the compaction outputs.

Differential Revision: D19337812

Pulled By: sagar0

fbshipit-source-id: edf8a72f11e405e93032ff5f45590816debe0bb4
HISTORY.md
db/compaction/compaction.cc
db/db_compaction_test.cc