basho/riak-ruby-client — pull request #121 by bkerley (2013-09-13 17:02:33+00:00)
Title: 2i Requests over PBC block forever when 0 results match in 1.4.x

Not sure if this is JRuby only, but the Riak client blocks forever when getting an index without any matching keys.

In 1.2.0, it was inconsistent between protocol types:
```ruby
jruby-1.7.2 :003 > RIAK.get_index("mybucket", "test_bin", "junk")
=> false
jruby-1.7.2 :003 > RIAK.protocol = "http"
=> "http"
jruby-1.7.2 :004 > RIAK.get_index("mybucket", "test_bin", "junk")
=> []
```

But in 1.4.0 and 1.4.1 it never returns PBC values when no matches are found:
```ruby
jruby-1.7.2 :003 > RIAK.get_index("mybucket", "test_bin", "junk")
#(blocks forever)
#(when interrupting:)
^CIRB::Abort: abort then interrupt!
from org/jruby/RubyIO.java:2924:in `read'
.../riak-client-1.4.1/lib/riak/client/beefcake_protobuffs_backend.rb:323:in `decode_index_response'
.../gems/riak-client-1.4.1/lib/riak/client/beefcake_protobuffs_backend.rb:316:in `decode_index_response'
.../gems/riak-client-1.4.1/lib/riak/client/beefcake_protobuffs_backend.rb:201:in `get_index'
.../gems/riak-client-1.4.1/lib/riak/client.rb:302:in `get_index'
.../gems/riak-client-1.4.1/lib/riak/client.rb:470:in `recover_from'
.../gems/innertube-1.0.2/lib/innertube.rb:127:in `take'
.../gems/riak-client-1.4.1/lib/riak/client.rb:468:in `recover_from'
.../gems/riak-client-1.4.1/lib/riak/client.rb:414:in `protobuffs'
.../gems/riak-client-1.4.1/lib/riak/client.rb:140:in `backend'
.../gems/riak-client-1.4.1/lib/riak/client.rb:301:in `get_index'
from (irb):9:in `evaluate'
from org/jruby/RubyKernel.java:1066:in `eval'
from org/jruby/RubyKernel.java:1392:in `loop'
from org/jruby/RubyKernel.java:1174:in `catch'
from org/jruby/RubyKernel.java:1174:in `catch'
from .../gems/railties-3.2.14/lib/rails/commands/console.rb:47:in `start'
from .../gems/railties-3.2.14/lib/rails/commands/console.rb:8:in `start'
from.../gems/railties-3.2.14/lib/rails/commands.rb:41:in `(root)'
from org/jruby/RubyKernel.java:1027:in `require'
```