Search code examples
node.jsaerospike

Aerospike NodeJS Client - "minConnsPerNode" Option


I'm trying to use the minConnsPerNode setting but it doesn't seem to work.

I've opened an issue at the repository but after a month I still got no answer. (Issue)

  const Aerospike = require('aerospike')
  
  const config = {
    hosts: '127.0.0.1:3000',
    minConnsPerNode: 1, // works if minConnsPerNode is removed
  }
  
  const run = async () => {
    Aerospike.setDefaultLogging({ level: Aerospike.log.DEBUG, file: process.stderr.fd })
    const client = await Aerospike.connect(config);
  
    const puts = Array.from({ length: 5 }, (_, i) => client.put(new Aerospike.Key('ssd-store', 'test', i), { i }))
  
    await Promise.all(puts)
    client.close()
  }
  
  run()

More details can be found in the issue


Solution

  • This has been fixed in [email protected]. More details can be found in the issue