0

I use riak erlang client for my project, and update riak and client library today from master(client to 1.3.1 and server to 1.2.0). Everything works except fetching multiple entities with map-reduce return empty. Instead of usual result {ok, [...,{<stage_number>,<stage result>},...]} I get {ok,[]}. Rollback with client and everything works ok. But if I use old client with new riak I got a lot of errors in the server logs.

This is a code example, where BK is list of {Bucket, Key} pairs and every pair is related to an existing entity:

{ok, [{0,Result}]}=riakc_pb_socket:mapred(Pid, BK,[{map, {modfun, riak_kv_mapreduce, map_object_value},undefined, true}])

How can I change that line of code to make it work?

szegedi
  • 863
  • 8
  • 20

1 Answers1

0

For me it works fine:

(app@blinkov)10> riakc_pb_socket:mapred(Pid, BK,[{map, {modfun, riak_kv_mapreduce, map_object_value},undefined, true}]).
  {ok,[{0, 
      [<<131,108,0,0,0,16,104,2,100,0,9,112,111,115,116,95,116,
         101,120,116,109,0,0,...>>,
       <<131,108,0,0,0,16,104,2,100,0,9,112,111,115,116,95,
         116,101,120,116,109,0,...>>]}]}

Also with 1.3.1 and 1.2.0 respective versions.

Ivan Blinkov
  • 2,466
  • 15
  • 17