Description
When opening an index as read-only for a new store (eg Index.v ~readonly:true ~log_size "./new-index"
) the paths "./new-index" and "./new-index/index" are created on disk and a usable, but empty, index value is returned. If ~fresh:true
is passed, however, an exception is raised.
It is unexpected for a read-only instance to create anything on disk. The ideal behavior would be for index to either disallow opening an index as read-only if it does not exist (perhaps raise the same exception) or support empty read-only instances -- like the current behavior -- but that have no backing on disk. The second option would be the least disruptive to existing clients that might depend on the current non-exception raising behavior.
As reported by @vect0r-vicall.