I think I found the answer and it is no, I cannot control the sort. I found the code here in riak_kv_wm_link_walker.erl:
links(Object) -> MDs = riak_object:get_metadatas(Object), lists:umerge( [ case dict:find(?MD_LINKS, MD) of {ok, L} -> [ [B,K,T] || {{B,K},T} <- lists:sort(L) ]; error -> [] end || MD <- MDs ]). Why run lists:sort? Shouldn't the sort be up to the user after he gets the actual object? I don't understand why the sort processing is necessary at the link phase. Thoughts? --Andrew On Sun, Jun 26, 2011 at 3:15 PM, Andrew Berman <rexx...@gmail.com> wrote: > I've noticed that when I run the link function, it automatically > orders the links based on Id. Is there a way to tell it not to sort > the links? In other words, I want the links in the order in which > they were put in the list (most recent at the head of the list) and I > see from Rekon that that is how they are being stored. Basically, I'm > running a reduce_slice on the result of the link phase so that Riak > doesn't load up all the objects with which the links are pointing. If > the answer is no, I cannot control the order of the links, is the only > option to prepend something like the time (e.g. millis since > 1-1-1970)? > > Thanks, > > Andrew > _______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com