Alexander- Check out the function in riak_core:riak_core_util
http://github.com/basho/riak/blob/master/apps/riak_core/src/riak_core_util.erl#L126 <http://github.com/basho/riak/blob/master/apps/riak_core/src/riak_core_util.erl#L126>I think it's something like 2^42 at that moment in time (now() is appended to the uid), for a collision to take place. Cheers, Matt On Mon, Apr 26, 2010 at 8:52 AM, Alexander Sicular <[email protected]>wrote: > When doing a POST against a bucket without indicating a key, riak > auto-generates a 27 characted mixedcase alphanum (with possibly + 2 other > chars for radix(64) ) unique ID.... How does it do that? What's the seed? > What guarantees of uniqueness are there? I take it even if there was a > conflict riak would default to it's vclock behavior... > > Interestingly, it looks like there are "contained" links set at the bucket > level for each of the keys created. How does that affect performance? like > lets say i wanted to use riak auto gen'd keys in a bucket that could have > tens of thousands of records in it... Would that block a GET on the bucket > over http once you have enough keys in the bucket? I think the limit is an > 8k header. > > And what if you wanted to modify props on a bucket, would you have to get > the bucket first, with links header, and then re-write with the new props > body and old links header? I thought you had to write link+body because if > you only write body you lose the links. > > Thanks, Alexander > _______________________________________________ > riak-users mailing list > [email protected] > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com >
_______________________________________________ riak-users mailing list [email protected] http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
