Different results to same queries

Christopher Meiklejohn cmeiklejohn at basho.com
Mon May 4 13:40:45 EDT 2015


> On Apr 22, 2015, at 6:45 PM, Sadykov Rustem <sadrust at gmail.com> wrote:
> 
> Hello.
> I'm testing riak 1.4.10 on 2 node cluster (on different servers), but result is same on 3 nodes cluster and on single node also.
> 
> I try to count records in my bucket and always get 3-4 different results.
> Query is:
> 
> curl -XPOST http://localhost:8098/mapred -H 'Content-Type: application/json' -d '{"inputs":"account", "query":[{"reduce":{"language":"erlang", "module":"riak_kv_mapreduce", "function":"reduce_count_inputs", "arg":{"reduce_phase_batch_size":1000} } }] }’

Hi Sadykov,

Map/Reduce chooses one replica for each value to execute the query on during a distributed Map/Reduce job.  Given that, subsequent executions might occur on different replicas given the coverage plan chosen during that period.

That said, can you provide information on when you are writing the values you are running the job against?  For example, are you writing to a quorum of nodes right before the query?  It’s possible to see some staleness if you are using majority quorums and you are executing against replicas that are delayed due to network traffic.

- Chris

Christopher Meiklejohn
Senior Software Engineer
Basho Technologies, Inc.
cmeiklejohn at basho.com





More information about the riak-users mailing list