Comments (5)
The info method works as designed, i.e. it returns the requested info per each cluster node through the callback method as soon it is received by the client. Note that the method also has an additional, 2nd callback, which is called once all the nodes have responded:
Client.prototype.info = function (request, host, policy, infoCb, doneCb) { ... }
See the API docs for the full method signature.
But I get how this behavior be a bit unexpected and that for many use cases it would be more convenient to have all the info returned in a single callback. I'll consider this a feature request for a future update. A pull request would be welcome as well. :-)
from aerospike-client-nodejs.
Hi @woozyking
Are you still facing the issue, I tried to reproduce this and could not. Please do share the code snippet if you are facing this issue.
Thanks
from aerospike-client-nodejs.
@GayathriKaliyamoorthy I think the code snippet would still be the same I posted above. If it can no longer be reproduced by you using async
library, then this should be good to be closed.
I no longer do this check though on our Aerospike cluster, but just a simple connectivity test.
To me client.info('statistics')
seemed more appropriate to be client.on('statistics', function(...) {...})
with the original behavior I posted this issue about, at least less confusing. I'm not entirely sure about the new behavior now, but I appreciate your help.
from aerospike-client-nodejs.
I recently faced the same issue (with node.js client version 2.2.0)
I wanted a count of records in a set, so I was calling
client.info('sets/test/testset', callback)
(& then parsing to get n_objects
)
I was getting callback already called
error when using the multi-node cluster but was working fine on a single node cluster.
from aerospike-client-nodejs.
I've added a new Client#infoAll
method, which queries all the cluster nodes and returns the results in a single callback method call. This will be included in the next release, which is tentatively scheduled for next week.
from aerospike-client-nodejs.
Related Issues (20)
- Does aerospike-client-nodejs need python on runtime as well? HOT 1
- I cant install on windows 10 HOT 2
- Issue with using client.operate with policy exists: AS.policy.exists.CREATE HOT 1
- Serialized and blocking connection
- Unable to install aerospike with nexus3 HOT 16
- Unable to install v5.9.0 with yarn, published version requires "npm-run-all" HOT 3
- System's openssl version since static linking in v5.6.0 HOT 4
- Missing 'bool/AS_EXP_TYPE_BOOL' in exp bin type HOT 2
- Unable to use pnpm package manager because of preinstall script of the package HOT 2
- Client.close(true) does not release underlying event loop HOT 2
- Segmentation fault with secondary index query HOT 12
- Typescript build fails HOT 1
- Segmentation fault crash core dump with 5.11.0 HOT 3
- Can't install with node 22 HOT 2
- --build-from-source is broken on Rocky 9, node 20
- Unable to get a record by filter 'contains' if bin array includes > 1 element
- Unable to find record by regexp pattern
- Aerospike.maps.returnType.KEY_VALUE is missing
- client.exist(key) is missing metadata
- signature of 'batchRead' is incorrect in typings HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aerospike-client-nodejs.