I meet this issue on Aerospike community version 3.8.3.
Aql select command encounters timeout issue when another scan job which scanning another set is running
issue : aql> select userId from test.dealer Error: (9) Timeout: timeout=1000 iterations=1 failedNodes=0 failedConns=0
but I select it using secondary index like following, it works fine.
aql> select userId from test.dealer where isDel=0 +-----------+ | userId | +-----------+ | "aAAAADs" | | "cwAAAEc" | | "ZgAAADg" | | "bAAAAD8" | | "RAAAAAY" | +-----------+
5 rows in set (0.001 secs)
I do some simple test work, I found following conditions can cause this issue:
- at that time, anther scan job ( which scan another set) is running and not completed.
- select all on different set by AQL.
but if I use secondary index or primary key to query by AQL, it works fine. if I stopped the scan job, it works fine too. And if I scan the same set, it also work fine.
Sometimes, I change the timeout setting, the select AQL can work, but the performance cannot be acceptable, because the records in this set are not so many ( less than 10 records), 1 second is enough to finished this query.
So I turn to the community to resolve my issue, thanks.