Skip to content

fix(model): say the duplicate index is not created in the duplicate index warning - #16477

Closed
christianaurichzm wants to merge 1 commit into
Automattic:masterfrom
christianaurichzm:fix/16476-duplicate-index-warning
Closed

christianaurichzm wants to merge 1 commit into
Automattic:masterfrom
christianaurichzm:fix/16476-duplicate-index-warning

Conversation

@christianaurichzm

Copy link
Copy Markdown

Fix #16476

The duplicate index warning names the cause but not the consequence. MongoDB rejects the duplicate with an IndexOptionsConflict error, so options that exist only on the later definition (expireAfterSeconds, unique, partialFilterExpression) are never applied. For a TTL index that means retention silently does not happen and the collection grows forever, while the warning reads like a schema hygiene note.

Message change only, no behavior change. I saw #15093 and #15135 and understand the preference for warning over failing.

Extends the existing gh-15056 test rather than adding a new one. The added assertion fails without the message change.

@vkarpov15

Copy link
Copy Markdown
Collaborator

Was fixed by #16478 sorry looks like a duplicate PR came in

@vkarpov15 vkarpov15 closed this Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Duplicate index warning does not say the duplicate is never created

2 participants