Hi everyone,
sorry for the spam, I just opened an issue in the RocksDB Github issue tracker with the same title:
The full details about the problem can be found in that Github issue, but the bottom line is that when using a combination of snapshots and IngestExternalFile, RocksDB seems to bump the WAL sequence number so that there can be gaps in the WAL file sequence numbers. This will break GetUpdatesSince(), which checks that the sequence numbers in the WAL are contiguous. GetUpdatesSince() and the TransactionLogIterator then fail with "Corruption: gap in sequence numbers" errors.
It seems to me that this combination of features (snapshots, IngestExternalFile(), GetUpdatesSince()) is not often used, so maybe it is just unsupported.
We would actually like to move some of our code parts to using IngestExternalFile(), given its better performance and other advantages over multiple WriteBatch::Puts. But currently it looks like this would be unsafe.
Are there ways to make RocksDB _not_ bump the sequence number when calling IngestExternalFile()? I found that there is a flag "snapshot_consistency" in the ingestion options, but it doesn't seem to remove the issue completely.
Any guidance on how to move on from here would be really helpful.
Thanks!
J