From 3a6061ada79388698b2746e385ff6f4d5dd29e29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferm=C3=ADn=20Gal=C3=A1n=20M=C3=A1rquez?= Date: Wed, 13 Jul 2022 10:18:49 +0200 Subject: [PATCH] ADD new indexes for Orion --- src/orchestrator/core/mongo.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/orchestrator/core/mongo.py b/src/orchestrator/core/mongo.py index 597f4bdc..42e7ca9e 100644 --- a/src/orchestrator/core/mongo.py +++ b/src/orchestrator/core/mongo.py @@ -57,8 +57,13 @@ def createOrionIndexes(self, SERVICE_NAME): db.entities.create_index("expDate", expireAfterSeconds=0) db.entities.create_index([("_id.servicePath", pymongo.ASCENDING), ("_id.id", pymongo.ASCENDING), - ("_id.type", pymongo.ASCENDING)]) + ("_id.type", pymongo.ASCENDING)]) db.entities.create_index("creDate") + # New indexes, requested by devops teams. See issue #335 + db.entities.create_index("_id.id") + db.entities.create_index("_id.type") + db.entities.create_index("_id.servicePath") + db.entities.create_index("attrNames") except Exception as e: logger.warn("createIndex database %s exception: %s" % (databaseName,e))