FAIL:201:NO INDEX Error on Secondary Index Creation

Error FAIL:201:NO INDEX on Secondary Index creation


Here are the steps for the creation of secondary indices as initiated from a client library:

  1. Client sends a create index command to a single node.

  2. The receiving node asynchronously forwards the create index command to all other nodes in the cluster (through SMD) and does not wait for a response.

  3. Each node puts the create index command on a queue to be processed.

  4. The receiving node returns immediately.

  5. The client isDone() polls all server nodes for index status.

The problem that can arise is that some nodes may not have started processing the create index command by the time the client polls for status, resulting in the following error:



The Java client has implemented the following 2 methods: waitTillComplete() and queryIfDone(). queryIfDone() (called by waitTillComplete()) will not treat error conditions as done. If the timeout is defined, waitTillComplete() will timeout if nodes continue to return errors or incomplete status. At the time of the timeout, an exception will be thrown.




January 2020

© 2015 Copyright Aerospike, Inc. | All rights reserved. Creators of the Aerospike Database.