You are not supposed to have duplicates is a bit strong - I was over reading into something Yonik had mentioned in the past. It looks like its supposed to become more useful:

I think Yonik might have to clear this up, but it looks like the current implementation is not deterministic, and he has it listed as a TODO:

           // make which duplicate is used deterministic based on shard
           // if (prevShard.compareTo(srsp.shard) >= 0) {
           //  TODO: remove previous from priority queue
           //  continue;
           // }


Mark Miller wrote:
I don't think your supposed to have duplicate keys? I think its supposed to work more as a graceful failure than a feature you should count on. Id's should be unique across the collection.

Ok, now I'm confused, if the shard the document comes from is non-deterministic, how can you use this 'trick'? (except that since the response time of the first shard which is smaller is usually better which would mean it'll work most of time (BAD!)) Or was Koji's memory incorrect and the shard first mentioned is always the authoritative shard when encountering duplicate keys?

Regards,

gwk





--
- Mark

http://www.lucidimagination.com



Reply via email to