# Secondary index corruption and newly created indexes not readable

**URL:** <https://discuss.aerospike.com/t/secondary-index-corruption-and-newly-created-indexes-not-readable/3139>\
**Category:** General Discussion\
**Tags:** secondary, index\
**Created:** [July 7, 2016, 4:27pm UTC](https://discuss.aerospike.com/t/secondary-index-corruption-and-newly-created-indexes-not-readable/3139 "2016-07-07T16:27:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anand\_Mahajan](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@Anand\_Mahajan](https://discuss.aerospike.com/u/Anand_Mahajan)\
**Post date:** [July 7, 2016, 4:27pm UTC](https://discuss.aerospike.com/t/secondary-index-corruption-and-newly-created-indexes-not-readable/3139/1 "2016-07-07T16:27:46Z")

</div>

We modified the default-ttl, set it to 0 for one the namespaces and restarted the cluster one node at at time. Its a 6 node cluster. The data size on each node is about 400GB and rebuilding the secondary indexes take anywhere between 2-3 days. Everything was smooth for first 4 nodes. When we restarted the 5th node something went wrong that seems to have corrupted the existing secondary indexes as none of these return any results and return an error code { code: 201, message: ‘AEROSPIKE\_ERR\_INDEX\_NOT\_FOUND’, func: ‘as\_query\_parse\_records’, file: ‘src/main/aerospike/aerospike\_query.c’, line: 335 } and newly created indexes return { code: 203, message: ‘AEROSPIKE\_ERR\_INDEX\_NOT\_READABLE’, func: ‘as\_query\_parse\_records’, file: ‘src/main/aerospike/aerospike\_query.c’, line: 335 } - We are using Nodejs library to access data in Aerospike. Any help is much appreciated.

---

<div class="post-metadata">

**Author:** ![Anand\_Mahajan](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@Anand\_Mahajan](https://discuss.aerospike.com/u/Anand_Mahajan)\
**Post date:** [July 7, 2016, 4:37pm UTC](https://discuss.aerospike.com/t/secondary-index-corruption-and-newly-created-indexes-not-readable/3139/2 "2016-07-07T16:37:49Z")

</div>

Dropped and recreated smaller indexes but these are not readable either.

---

<div class="post-metadata">

**Author:** ![Ashu](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/ashu/32/835_2.png) [@Ashu](https://discuss.aerospike.com/u/Ashu)\
**Post date:** [June 19, 2018, 4:45am UTC](https://discuss.aerospike.com/t/secondary-index-corruption-and-newly-created-indexes-not-readable/3139/3 "2018-06-19T04:45:49Z")

</div>

If no secondary index was created on the specified query object, an AEROSPIKE\_ERR\_INDEX\_NOT\_FOUND error returns.

If an index creation was initiated but did not complete and then a query executes, an AEROSPIKE\_ERR\_INDEX\_NOT\_READABLE error returns.
