Skip to content

Commit 4bba825

Browse files
authored
Fix IndexOptionsConflict for kind_updated index (#3303)
Set explicit name "kind_updated" on (kind, updated_at, dataset) index to match the existing index in the database and prevent mongoengine from trying to create it with an auto-generated name. Fixes SSE API pod crash loop caused by IndexOptionsConflict (code 85). Made-with: Cursor
1 parent 781e206 commit 4bba825

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libs/libcommon/src/libcommon/simple_cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ class CachedResponseDocument(Document):
170170
("error_code", "kind", "details.copied_from_artifact"), # < recommended by Atlas
171171
("http_status", "error_code", "kind", "updated_at"), # < recommended by Atlas
172172
("kind", "http_status", "updated_at"), # optimize updated_at range queries
173-
("kind", "updated_at", "dataset"), # optimize updated_at range with dataset
173+
{"fields": ["kind", "updated_at", "dataset"], "name": "kind_updated"},
174174
],
175175
}
176176
objects = QuerySetManager["CachedResponseDocument"]()

0 commit comments

Comments
 (0)