Description
Today, there is no way to track the creation status for an index creation request and this is forcing the clients/end-users to retry their index access/query/related endpoints with random delays.
This approach isn't desirable or sounds too naive.
FTS should provide an endpoint that reveals the readiness status of the index.
The endpoint would return just the metadata level creation/readiness status of the index.
And it could perhaps return an indexing progress stats, but not very sure about this at the moment.
Without such a feature, the SDKs/Clients would get errors like below.
20:58:04 WARN [com.couchbase.client.java.SearchIntegrationTest:110] Retrying due to com.couchbase.client.core.error.CouchbaseException: Unknown search error: "rest_index: Query, indexName: idx-3776da64-0b98-4638-a45e-aa520b5ddea1, err: bleve: bleveIndexTargets, err: pindex: no planPIndexes for indexName: idx-3776da64-0b98-4638-a45e-aa520b5ddea1" {"completed":true,"coreId":"0x8e53fe9c00000021","httpBody":"\"rest_index: Query, indexName: idx-3776da64-0b98-4638-a45e-aa520b5ddea1, err: bleve: bleveIndexTargets, err: pindex: no planPIndexes for indexName: idx-3776da64-0b98-4638-a45e-aa520b5ddea1\"","httpStatus":400,"idempotent":true,"lastDispatchedFrom":"10.100.189.16:49905","lastDispatchedTo":"172.23.111.130:8094","requestId":11099,"requestType":"SearchRequest","retried":0,"service":{"indexName":"idx-3776da64-0b98-4638-a45e-aa520b5ddea1","type":"search"},"status":"INVALID_ARGS","timeoutMs":75000,"timings":{"dispatchMicros":9411,"totalDispatchMicros":9411,"totalMicros":11247}} |
20:58:04 WARN [com.couchbase.client.java.SearchIntegrationTest:110] Retrying due to com.couchbase.client.core.error.CouchbaseException: Unknown search error: "rest_index: Query, indexName: idx-3776da64-0b98-4638-a45e-aa520b5ddea1, err: bleve: bleveIndexTargets, err: pindex: no planPIndexes for indexName: idx-3776da64-0b98-4638-a45e-aa520b5ddea1" {"completed":true,"coreId":"0x8e53fe9c00000021","httpBody":"\"rest_index: Query, indexName: idx-3776da64-0b98-4638-a45e-aa520b5ddea1, err: bleve: bleveIndexTargets, err: pindex: no planPIndexes for indexName: idx-3776da64-0b98-4638-a45e-aa520b5ddea1\"","httpStatus":400,"idempotent":true,"lastDispatchedFrom":"10.100.189.16:49905","lastDispatchedTo":"172.23.111.130:8094","requestId":11100,"requestType":"SearchRequest","retried":0,"service":{"indexName":"idx-3776da64-0b98-4638-a45e-aa520b5ddea1","type":"search"},"status":"INVALID_ARGS","timeoutMs":75000,"timings":{"dispatchMicros":7892,"totalDispatchMicros":7892,"totalMicros":8734}} |
20:58:04 WARN [com.couchbase.client.java.SearchIntegrationTest:110] Retrying due to com.couchbase.client.core.error.CouchbaseException: Unknown search error: "rest_index: Query, indexName: idx-3776da64-0b98-4638-a45e-aa520b5ddea1, err: bleve: bleveIndexTargets, err: pindex: no planPIndexes for indexName: idx-3776da64-0b98-4638-a45e-aa520b5ddea1" {"completed":true,"coreId":"0x8e53fe9c00000021","httpBody":"\"rest_index: Query, indexName: idx-3776da64-0b98-4638-a45e-aa520b5ddea1, err: bleve: bleveIndexTargets, err: pindex: no planPIndexes for indexName: idx-3776da64-0b98-4638-a45e-aa520b5ddea1\"","httpStatus":400,"idempotent":true,"lastDispatchedFrom":"10.100.189.16:49905","lastDispatchedTo":"172.23.111.130:8094","requestId":11101,"requestType":"SearchRequest","retried":0,"service":{"indexName":"idx-3776da64-0b98-4638-a45e-aa520b5ddea1","type":"search"},"status":"INVALID_ARGS","timeoutMs":75000,"timings":{"dispatchMicros":7690,"totalDispatchMicros":7690,"totalMicros":8150}} |
and
{idx-2bdb5fdb-c292-4eab-9f01-d9d2a4ffcebe_17288b616914c936_13aa53f3=pindex not available,
|
idx-2bdb5fdb-c292-4eab-9f01-d9d2a4ffcebe_17288b616914c936_54820232=pindex not available,
|
idx-2bdb5fdb-c292-4eab-9f01-d9d2a4ffcebe_17288b616914c936_6ddbfb54=pindex not available,
|
idx-2bdb5fdb-c292-4eab-9f01-d9d2a4ffcebe_17288b616914c936_aa574717=pindex not available,
|
idx-2bdb5fdb-c292-4eab-9f01-d9d2a4ffcebe_17288b616914c936_f4e0a48a=pindex not available}
|
Such an endpoint would help avoid all such errors while invoking index-level REST endpoint.