anchor.diff:                      Buffer
               end
       end;
  -fold_fun({keys, RecoverTsFun}, BufferMod, Filter, undefined) ->
  -    fun(_, Key, Buffer) ->
  -            CompoundKey = RecoverTsFun(Key),
  -            case Filter(CompoundKey) of
  -                true ->
  -                    BufferMod:add(CompoundKey, Buffer);
  -                false ->
  -                    Buffer
  -            end
  -    end;
   fold_fun(keys, BufferMod, Filter, {Bucket, Index, N, NumPartitions}) ->
       fun(_, Key, Buffer) ->
               Hash = riak_core_util:chash_key({Bucket, Key}),
  
positive.code:     BufferSize = proplists:get_value(buffer_size, Opts0, DefaultBufSz),
      Buffer = BufferMod:new(BufferSize, ResultFun),
      Extras = fold_extras_keys(Index, Bucket),
      %% if Options contain ddl_mod, then we are folding keys for
      %% list_ts_keys
      FoldFunSelector = keys,
      FoldFun = fold_fun(FoldFunSelector, BufferMod, Filter, Extras),
      FinishFun = finish_fun(BufferMod, Sender),
  
negative.code:     fun(_, Key, Buffer) ->
              BufferMod:add(Key, Buffer)
      end;
  fold_fun(keys, BufferMod, none, {Bucket, Index, N, NumPartitions}) ->
      fun(_, Key, Buffer) ->
              Hash = riak_core_util:chash_key({Bucket, Key}),
              case riak_core_ring:future_index(Hash, Index, N, NumPartitions, NumPartitions) of
                  Index ->
                      BufferMod:add(Key, Buffer);
                  _ ->
                      Buffer
              end
  