basho / riak-nodejs-client

The Riak client for Node.js.
Apache License 2.0
72 stars 29 forks source link

simple script stopped to work after 1.8.1 to 1.9+ upgrade #128

Closed mogadanez closed 8 years ago

mogadanez commented 8 years ago
var Riak = require('basho-riak-client');

var client =  new Riak.Client( ["localhost:8087"] );

client.listKeys( {bucket: "test-bucket", stream: false, bucketType: "test"}, function(err,data){
    if ( err )
        throw err;
    console.log( data)

})

now it reports

[RiakCluster] starting.
[RiakNode] (localhost:8087) starting
[RiakConnection] using cork() / uncork()
[RiakCluster] execute command: RpbListKeysReq remaining tries: 3.

test.js:26
        throw err;
        ^
No RiakNodes available to execute command.

As I understand start callback is required now, but then need validate that it is provided, or implement "sync" logic inside constructor if it is not provided

lukebakken commented 8 years ago

Please note my response to #127 and #129

I don't believe it is worth the effort (or possible, perhaps) to implement synchronous behavior when this argument is not present. A pull request with tests for that would be accepted.