[PR #162] [MERGED] fix: resolve MongoDB IndexOptionsConflict for status+mtime index on SlackMsgs #162

Closed
opened 2026-10-27 21:10:09 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/Comfy-PR/pull/162
Author: @comfy-pr-bot
Created: 2/17/2026
Status: ✅ Merged
Merged: 2/17/2026
Merged by: @snomiao

Base: main ← Head: fix/slack-index-conflict


📝 Commits (1)

  • 31cd351 fix: resolve MongoDB IndexOptionsConflict for status+mtime index on SlackMsgs

📊 Changes

1 file changed (+1 additions, -7 deletions)

View changed files

📝 lib/slack/SlackMsgs.ts (+1 -7)

📄 Description

Summary

  • The index { status: 1, mtime: 1 } already exists in production MongoDB with the auto-generated name status_1_mtime_1
  • PR #153 added this index with a custom name idx_status_mtime, causing MongoServerError code 85 (IndexOptionsConflict) on every hourly run
  • This crash happens before any tasks execute, blocking the GPL-3.0 license bot (merged in #156) and all other scheduled tasks

Fix

Remove the custom name option from SlackMsgs.createIndex() so the call is idempotent — MongoDB will match the existing index by key pattern and skip creation.

Test plan

  • Hourly run no longer crashes at startup with IndexOptionsConflict
  • GPL-3.0 license PRs start appearing on custom node repos

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/Comfy-PR/pull/162 **Author:** [@comfy-pr-bot](https://github.com/comfy-pr-bot) **Created:** 2/17/2026 **Status:** ✅ Merged **Merged:** 2/17/2026 **Merged by:** [@snomiao](https://github.com/snomiao) **Base:** `main` ← **Head:** `fix/slack-index-conflict` --- ### 📝 Commits (1) - [`31cd351`](https://github.com/Comfy-Org/Comfy-PR/commit/31cd351bb5acf6a2329e30de6df18fbdef9217ea) fix: resolve MongoDB IndexOptionsConflict for status+mtime index on SlackMsgs ### 📊 Changes **1 file changed** (+1 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `lib/slack/SlackMsgs.ts` (+1 -7) </details> ### 📄 Description ## Summary - The index `{ status: 1, mtime: 1 }` already exists in production MongoDB with the auto-generated name `status_1_mtime_1` - PR #153 added this index with a custom name `idx_status_mtime`, causing `MongoServerError` code 85 (`IndexOptionsConflict`) on every hourly run - This crash happens before any tasks execute, blocking the GPL-3.0 license bot (merged in #156) and all other scheduled tasks ## Fix Remove the custom `name` option from `SlackMsgs.createIndex()` so the call is idempotent — MongoDB will match the existing index by key pattern and skip creation. ## Test plan - [ ] Hourly run no longer crashes at startup with `IndexOptionsConflict` - [ ] GPL-3.0 license PRs start appearing on custom node repos 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-27 21:10:09 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/Comfy-PR#162
No description provided.