Relationships
#3344 extensions_search index is never created if the first attempt fails, until the process restarts
Opened by skunk-ape · 10/13/2026
MongoExtensionRepository.ensureSearchIndex swallows every failure (empty catches around listSearchIndexes, updateSearchIndex and createSearchIndex), and getExtensionRepo in lib/app/repos.ts runs ensureIndexes() once per process behind indexesEnsured. If createSearchIndex fails transiently, nothing retries and nothing is logged.
Seen on mongodb-atlas-local: for a few seconds after $listSearchIndexes starts answering, createSearchIndex fails with "Error connecting to Search Index Management service". An app that touches the extension repo in that window never gets an extensions_search index. Every free-text search then falls back to regex (warn log "Atlas search threw; falling back to regex") until a restart. swamp-uat works around it with a compose healthcheck (swamp-uat#636).
Prod's existing long-lived index is unaffected. A fresh environment, or a dropped or renamed index, would stay unindexed for the life of each replica.
Expected: a failed create or update retries with backoff (or on a later getExtensionRepo call), and the failure is logged, not swallowed.
Found while doing UAT for #3057.
Open
No activity in this phase yet.
Sign in to post a ripple.