Comments (3)
Hi,
client.close()
should be invoked only when all the operations that are performed using the client object is completed. The semantics of client.close()
is release all the resource associated with client object. The resources include all the open connections and memory allocated for the client object. Once these resources are released, the client can no longer communicate with Aerospike Server and thus the processing stops.
In the above code snippet, you are not waiting for callback to be invoked by the client.batchGet(tweet_keys,function(terr,tresults){}
for this batchGet invocation. The client.close()
function must be invoked after processing this inner callback.
Thanks.
from aerospike-client-nodejs.
Absolutely, I realize that. I am just saying that, those call backs in the forloop do not get terminated, the code gets stuck in the forever unending dead end. If the connection drops for whatever reason and has similar functionality to client.close() will it mean that worker with all those unresolved call backs be stuck the same way?
from aerospike-client-nodejs.
Regarding the connection dropping for any reason, the underlying driver handles that case. Client
object stores the callback passed for the batchGet API and invokes it when the operation is completed. If the client object is destroyed, then the behavior is undefined.
Thanks
from aerospike-client-nodejs.
Related Issues (20)
- node alpine dockerfile example is not working with node:14.19.0-alpine3.15 HOT 1
- error: Linux distribution not supported: 'ubuntu22' HOT 2
- Typescript file missing in npm package? HOT 2
- aerospike-client-nodejs on MacOS builds successfully but doesn't work HOT 4
- Fix code scanning alert - Clear-text logging of sensitive information HOT 1
- Incompatibility between client version 5.0.2 and Ubuntu 18.04 HOT 1
- Docs: Broken "Client" doumentation HOT 1
- Version 5.1.1 breaks using Docker HOT 1
- Can't launch the library on macOS. HOT 3
- Error: Running aerospike client on Arm64(aarch) on MacOS HOT 7
- What is the latest version of Aerospike goes with Ubuntu 18.04 HOT 2
- error TS2304: Cannot find name 'Class' HOT 12
- 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
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.