affinity icon indicating copy to clipboard operation
affinity copied to clipboard

RocksDB Compaction Filters for custom event-time TTL (as opposed to write-time)

Open michal-harish opened this issue 8 years ago • 0 comments

https://github.com/facebook/rocksdb/wiki/Compaction-Filter

The timestamp is wrapped in the value bytes as 8 bytes big endian first and the ttl could be passed through rocksdb options.

  • RocksDB C++ Compaction Filters for per-key TTL and JNI binding would be nice
  • Even if the Java API becomes available the performance will be worse: https://github.com/facebook/rocksdb/pull/3338
    • https://github.com/facebook/rocksdb/blob/cfe0ec5e2ce9d020b56e90000967c9ffbb657c8e/java/src/test/java/org/rocksdb/JavaCompactionFilterTest.java

More clues:

  • https://github.com/facebook/rocksdb/blob/master/examples/compaction_filter_example.cc
  • https://github.com/ankgup87/rocksdbjni

michal-harish avatar Feb 21 '18 10:02 michal-harish