You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to rocksdb
Hi all,
I'm looking for some clarification on the safety of multiple concurrent BackupEngine objects operating on the same backup directory. Looking at the documentation, I know it's recommended not to have multiple BackupEngine objects at a time, and it is unspecified behavior to have a Write BackupEngine and a ReadOnly BackupEngine open concurrently. However, we have a use case where it would be valuable to have a single Write BackupEngine while allowing multiple concurrent ReadOnly BackupEngines to exist.
Suppose we implement an exclusive lock in our application code around DeleteBackup operations that prevents delete and open operations from being interleaved. This would ensure that Open will see a consistent state of the backup directory while it runs.
Would it then be safe to interact with multiple ReadOnly BackupEngine instances concurrently, where each ReadOnly BackupEngine has the following semantics: - getters return the state as of Open; - RestoreDBFromBackup will either restore correctly or fail to restore if racing with a delete (i.e. atomic), and the reader can handle such errors appropriately?
I'm somewhat convinced this matches the semantics we would get looking at the implementation, but I wanted to get a sanity check on whether this would be reasonable to rely on even if the documentation doesn't explicitly specify this behavior.