open
Opens the database in directory, wiring the layers options asks for.
The order is the point, and it is the order a caller assembling this by hand has to know: the catalogs are constructed first, composed into the store's observer slot second, and the store is opened third — because a flush can begin the moment it does, and an observer installed afterwards silently misses whatever was written in between. Only then is anything attached.
If RaboshOptions.backfill is true, this scans every segment neither layer covers before returning. That is one pass, not one per layer; see attach.
Anything thrown here closes whatever had already been opened, so a failed open leaks neither a directory lock nor a mapping.
Throws
if another process holds the directory.
if the directory is absent and StoreOptions.createIfMissing is false.