al8n/orderwal

Make `map` and `map_with_path_builder` of sync version WALs returns a reader backed by `unsync::Arena`

Opened this issue · 1 comments

al8n commented

Suppose a sync version of sync::OrderWal is constructed by map or map_with_path_builder. In that case, there is no reason to use rarena_allocator::sync::Arena as the backend, because map or map_with_path_builder means that the OrderWal cannot be modified anymore so that no data race will happen anymore.

Instance constructed by map or map_with_path_builder is not the same as reader methods of sync::OrderWal. reader let users create a read-only view on an active log, which means the writer can still modify the active log, so a rarena_allocator::sync::Arena is necessary for thread-safe.

al8n commented

Blocked by al8n/rarena#14