cruzdb/zlog

clean up striper initialization

dotnwat opened this issue · 0 comments

most of logimpl and the striper assume there is always a valid view. however, the striper needs to initialize the view from the projection object. currently we initialize with nullptr, then before returning a new log instance to the client we wait until a view has been read. this is non-optimal since it still requires special casing a couple spots.

a better solution may be to factor out the initialization code that reads from the projection object and installs new views so we can call this synchronously on log creation. maybe something like

init_view = Striper::read_stripe()
stripe = Stripe(..., init_view, ...)
log = LogImpl(.., stripe, ..)

but make sure that all of that code is shared with the normal view refresh path.