Unexpected EOF on PBC socket when MR on a key that doesn't exist #36

Closed
timhaines opened this Issue May 2, 2012 · 2 comments

Comments

Projects
None yet
2 participants

I'm not sure what reasonable expected behavior is, but if the MR needs to return an error then it should do something nicer than "Unexpected EOF on PBC socket"

To reproduce:

mr = Riak::MapReduce.new(my_riak_client)
mr.add("existing_bucket", "non_existing_key").add("existing_bucket","existing_key").map("function(v){ return [];}", :keep => true).run

SocketError: Unexpected EOF on PBC socket
from /Users/tim/.rvm/gems/ree-1.8.7-2012.02/gems/riak-client-1.0.3/lib/riak/client/beefcake_protobuffs_backend.rb:129:in decode_response' from /Users/tim/.rvm/gems/ree-1.8.7-2012.02/gems/riak-client-1.0.3/lib/riak/client/beefcake_protobuffs_backend.rb:108:inmapred'
from /Users/tim/.rvm/gems/ree-1.8.7-2012.02/gems/riak-client-1.0.3/lib/riak/client.rb:323:in mapred' from /Users/tim/.rvm/gems/ree-1.8.7-2012.02/gems/riak-client-1.0.3/lib/riak/client.rb:433:inrecover_from'
from /Users/tim/.rvm/gems/ree-1.8.7-2012.02/gems/riak-client-1.0.3/lib/riak/client/pool.rb:126:in take' from /Users/tim/.rvm/gems/ree-1.8.7-2012.02/gems/riak-client-1.0.3/lib/riak/client.rb:431:inrecover_from'
from /Users/tim/.rvm/gems/ree-1.8.7-2012.02/gems/riak-client-1.0.3/lib/riak/client.rb:377:in protobuffs' from /Users/tim/.rvm/gems/ree-1.8.7-2012.02/gems/riak-client-1.0.3/lib/riak/client.rb:131:inbackend'
from /Users/tim/.rvm/gems/ree-1.8.7-2012.02/gems/riak-client-1.0.3/lib/riak/client.rb:322:in mapred' from /Users/tim/.rvm/gems/ree-1.8.7-2012.02/gems/riak-client-1.0.3/lib/riak/map_reduce.rb:217:inrun'
from (irb):65

Having the map return [v] also has problems.

The same query over the http client returns the correct not_found result:

[{"not_found"=>{"keydata"=>"undefined", "bucket"=>"existing_bucket", "key"=>"non_existing_key"}}]

Contributor

seancribbs commented Oct 26, 2012

This no longer causes a connection close (resulting in a short read) on Riak 1.2+, closing.

@seancribbs seancribbs closed this Oct 26, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment