open the same db in read only mode
Error: Database already open. Cannot acquire lock.
I have one process which does read & write, another process which does read
rocksdb allows to open in readonly mode
See #678
rocksdb read only mode cannot sync with the write, secondary db instance doesn't work well either, if we cannot find a very useful and elegant solution, then I think we can abandon this
the whole point is to have 1 R/W + n R instances and the n read instances can sync well with the write
I believe this is available now since the document clarifies:
https://docs.rs/redb/latest/redb/struct.Database.html
Opened redb database file:
Multiple reads may be performed concurrently, with each other, and with writes.
pub fn begin_read(&self):
Read transactions may exist concurrently with writes
@axww AFAICT what you're quoting applies only within one process. What the OP asked for is multiple processes opening the same database. AFAIU as per https://github.com/cberner/redb/issues/678 this should be possible in the future, but is currently not implemented.