question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Query with "failOnClusterChange" breaks command queue

See original GitHub issue

Queries with “failOnClusterChange” and secondary index filter are instantly timing out once they are getting queued. The test passes correctly if ‘maxCommandsInProcess’ setting is high enough or if no secondary index is used.

Test to reproduce:

it('queue with failOnClusterChange', async (done) => {
  Aerospike.setupGlobalCommandQueue({ maxCommandsInProcess: 5, maxCommandsInQueue: 50 })
  client = await Aerospike.connect({
    hosts: '127.0.0.1:3000',
    policies: {
      query: new Aerospike.QueryPolicy({ totalTimeout: 10000, failOnClusterChange: true })
    }
  })

  try {
    await client.createIntegerIndex({
      ns: 'test',
      set: 'test',
      bin: 'i',
      index: 'test'
    })
  } catch (e) {
    //
  }

  const puts = Array.from({ length: 5 }, (_, i) => client.put(new Aerospike.Key('ssd-store', 'test', i), { i }))

  await Promise.all(puts)

  const queries = Array.from({ length: 5 }, async (_, i) => {
    const query = client.query('ssd-store', 'test')

    // does not work with sencondary index
    query.where(filter.equal('i', i))
    // works with predexp
    // query.where([predexp.integerBin('i'), predexp.integerValue(5), predexp.integerGreaterEq()])
    await query.results()
  })

  await Promise.all(queries)
  client.close()
  done()
})

Result: AerospikeError: Delay queue timeout

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
jheckingcommented, Dec 4, 2020

I’ve just released v3.16.2 to npmjs.com.

1reaction
jheckingcommented, Dec 2, 2020

A new C client version 4.6.19 is ready, which includes a fix for this issue. I’m planning to release Node.js client version 3.16.2 tomorrow.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Assigning queries to queues - Amazon Redshift
You can assign a query to a queue at runtime by assigning your query to the appropriate query group. Use the SET command...
Read more >
aerospike: Versions - Openbase
BREAKING : This client requires server version 4.9 or later. ... Query with "failOnClusterChange" causes timeout when using command queue.
Read more >
Settings option instead of Registry flag to disable Command ...
Can we have an option to disable Command Queue in Python Console? to be as it used to be. Disable via Registry. Open...
Read more >
Core Programming Guide — Level Zero Specification ...
hDriver) { break; } } free(allDrivers); if(nullptr == hDevice) return; ... The number and properties of command queue groups is queried by using ......
Read more >
QUERY QUEUES - IBM
The QUERY QUEUES command requests information about the files currently present in the queue for a node. RSCS may be in the process...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found