3

Does the Java API support the concept of getting all records after a certain point in time?

The RocksDB documents read:

"Incremental Backups and Replication need to be able to find and tail all the recent changes to the database. The API GetUpdatesSince allows an application to tail the RocksDB transaction log." from https://github.com/facebook/rocksdb/wiki/RocksDB-Basics

The GetUpdatesSince API does not seem to be available in the RocksDB Java API. Is there another way to do this in Java?

RickHigh
  • 1,808
  • 20
  • 16

2 Answers2

4

There is no other way to achieve the same behavior in Java like using the GetUpdatesSince functionality.

GetUpdatesSince is available in the Java API of RocksDB. You can call the method on an open RocksDB instance. After calling this method a TransactionLogIterator is retrieved which can be used to fetch updates since a Sequence Number offset. A TransactionLogIterator can fetch also updates which happened after the TransactionLogIterator was initialized (An example outlining this can be found within the tests).

The latest sequence number of a RocksDB instance can be retrieved using getLatestSequenceNumber.

Important to note is that the following Options (DBOptions) settings must be set to an appropriate value:

  • setWalTtlSeconds
  • setWalSizeLimitMB
fyr
  • 20,227
  • 7
  • 37
  • 53
0

It looks like GetWritesSince is being worked on, but as of today is not complete.

Randall Hauch
  • 7,069
  • 31
  • 28