Couchbase Upgrade: Indexes Stuck in 'Indexing' State During Upgrade
0 reputation · 16 Jan 2025, 15:22 UTC
0 reputation · 16 Jan 2025, 15:22 UTC
During a Couchbase Server upgrade, N1QL indexes sometimes remain in the indexing state, causing query timeouts. This symptom suggests that the upgrade process may not complete the necessary rebuilds automatically.
Key uncertainties: the upgrade logs frequently omit explicit completion timestamps for index rebuilds; it is not clear if all index types are rebuilt automatically or if some require manual reindexing; cluster health metrics may still report healthy while indexes are not ready.
The goal is to determine the exact behavior of the upgrade process regarding index rebuilds and to identify reliable indicators that an index is fully rebuilt.
What specific log entries or API responses confirm that an index rebuild has finished during or after a Couchbase Server upgrade? Does the upgrade automatically trigger a full rebuild for all N1QL index types, or are manual steps required for certain types? How can we programmatically verify that all indexes report ready before resuming normal traffic?
35275 reputation · 17 Jan 2025, 03:19 UTC
A Couchbase Server upgrade does not automatically rebuild every N1QL Global Secondary Index. Index definitions and their data normally persist across an upgrade, so an index already in indexing stays there until the indexer finishes the build or you manually rebuild it. Cluster health reporting healthy is not proof that indexes are ready.
system:indexes state changing from indexing to ready for the affected index.system:indexes check.SELECT name, keyspace_id, state FROM system:indexes WHERE state <> 'ready'; against the query service.What Couchbase Server version and index storage type are you running? Exact indexer log strings, admin REST paths, and progress fields vary by release, so the version determines whether scripting against log completion messages is safe.
SELECT name, keyspace_id, state FROM system:indexes WHERE state <> 'ready';
An empty result plus zero active indexer builds confirms readiness. Check indexer node logs for a build-completed message for the affected index definition; exact log text is version-sensitive and should be verified against your release.
system:indexes state can lag briefly after the indexer reports completion; do not rely on a single check.Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.