anchor.diff:      MemoryMB = app_helper:get_prop_or_env(max_memory, Config, memory_backend),
       TableOpts = case app_helper:get_prop_or_env(test, Config, memory_backend) of
                       true ->
  -                        [public, named_table];
  +                        [ordered_set, public, named_table];
                       _ ->
  -                        []
  +                        [ordered_set]
                   end,
       case MemoryMB of
           undefined ->
  
positive.code:     end.
  
  %% @private
  get_index_folder(Folder, Acc0, {index, _Bucket, {eq, <<"$bucket">>, _}}, DataRef, _) ->
      %% For the special $bucket index, turn it into a fold over the
      %% data table.
      get_folder(Folder, Acc0, DataRef);
  get_index_folder(Folder, Acc0, {index, Bucket, {range, <<"$key">>, Low, High}}, DataRef, _) ->
      %% For the special range lookup on the $key index, turn it into a
      %% select on the data table.
      fun() ->
              index_folder(ets:select(DataRef,
                                      ?KEY_RANGE_MS(Bucket, Low, High),
                                      ?SELECT_BATCH_SIZE),
                           Folder, Acc0)
      end;
  get_index_folder(Folder, Acc0, {index, Bucket, {eq, Field, Term}}, _, IndexRef) ->
      fun() ->
              index_folder(ets:select(IndexRef,
                                      ?EQ_MS(Bucket, Field, Term),
                                      ?SELECT_BATCH_SIZE),
                           Folder, Acc0)
      end;
  get_index_folder(Folder, Acc0, {index, Bucket, {range, Field, Low, High}}, _, IndexRef) ->
      fun() ->
              index_folder(ets:select(IndexRef,
                                      ?RANGE_MS(Bucket, Field, Low, High),
                                      ?SELECT_BATCH_SIZE),
                           Folder, Acc0)
      end.
  
  
  index_folder('$end_of_table', _Folder, Acc0) ->
      Acc0;
  index_folder({Matches, Cont}, Folder, Acc0) ->
      Acc = lists:foldl(Folder, Acc0, Matches),
      index_folder(ets:select(Cont), Folder, Acc).
  
  %% @private
  do_put(Bucket, Key, Val, IndexSpecs, DataRef, IndexRef) ->
  
negative.code:             TimeRef = undefined;
          _ ->
              MaxMemory = MemoryMB * 1024 * 1024,
              TimeRef = ets:new(?TNAME(Partition), TableOpts)
      end,
      IndexRef = ets:new(?INAME(Partition), TableOpts),
      DataRef = ets:new(?DNAME(Partition), TableOpts),
      {ok, #state{data_ref=DataRef,
                  index_ref=IndexRef,
  