fix odin syntax
This commit is contained in:
22
rocksdb_shim/rocksdb_shim.cc
Normal file
22
rocksdb_shim/rocksdb_shim.cc
Normal file
@@ -0,0 +1,22 @@
|
||||
// TODO: In order to use RocksDB's WAL replication helpers, we need to import the C++ library so we use this shim
|
||||
/**
|
||||
C++ shim implementation notes (the important bits)
|
||||
|
||||
In this rocksdb_shim.cc we'll need to use:
|
||||
|
||||
rocksdb::DB::Open(...)
|
||||
|
||||
db->GetLatestSequenceNumber()
|
||||
|
||||
db->GetUpdatesSince(seq, &iter)
|
||||
|
||||
from each TransactionLogIterator entry:
|
||||
|
||||
get WriteBatch and serialize via WriteBatch::Data()
|
||||
|
||||
apply via rocksdb::WriteBatch wb(data); db->Write(write_options, &wb);
|
||||
|
||||
Also we must configure WAL retention so the followers don’t fall off the end. RocksDB warns the iterator can become invalid if WAL is cleared aggressively; typical controls are WAL TTL / size limit.
|
||||
|
||||
https://github.com/facebook/rocksdb/issues/1565
|
||||
*/
|
||||
Reference in New Issue
Block a user