anchor.diff:    gen_server:cast(Pid, stop).
   
   %%%*_ gen_server CALLBACKS =====================================================
  +
   init(Options) ->
     Dir = keyget(key, Options),
  +  SegMB = case keyget(segMB, Options, ?DEFAULT_SEG_MB) of
  +            MB when MB < ?MINIMUM_SEG_MB -> ?MINIMUM_SEG_MB;
  +            MB                           -> MB
  +          end,
     gen_server:cast(self(), post_init),
  -  #state{dir = Dir}.
  +  #state{dir = Dir, segMB = SegMB}.
   
   handle_cast(post_init, #state{} = State) ->
     NewState = do_init(State),
  
positive.code: maybe_close_w_cur(W_cur)  -> gululog_idx:flush_close(W_cur).
  
  %%%*_ TESTS ====================================================================
  -ifdef(TEST).
  -include_lib("eunit/include/eunit.hrl").
  
  dir_missing_test() ->
    ?assertException(error, {field_value_missing, state, dir}, #state{}).
  
  -endif.
  
  
negative.code: %%       4. open writer cursor
  do_init(State) -> State.
  
  %% @private Get value from key-value list, crash if not found.
  -spec keyget(Key::term(), [{Key::term(), Value::term()}]) -> Value::term().
  keyget(Key, KvList) ->
    {Key, Value} = lists:keyfind(Key, 1, KvList),
    Value.
  
  %% @private Get value from key-value list, return default if not found
  -spec keyget(Key::term(), [{Key::term(), Value::term()}], Default::term()) -> Value::term().
  keyget(Key, KvList, Default) ->
    case lists:keyfind(Key, 1, KvList) of
      {Key, Value} -> Value;
      false        -> Default
    end.
  
  -spec maybe_close_index(?undef | index()) -> ok.
  maybe_close_index(?undef) -> ok;
  