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 1/3] 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)) From 15c9963397cc4a998210c6edd3c52cf160cbbf79 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:19:45 +0200 Subject: [PATCH 2/3] ADD Changelog entry --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8424626d..9e60555a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ CHANGES ======= +ADD: new Orion indexes to optimize operations (#335) + 4.3.0 ADD: new API to rename subservice (including mongo database of Orion, STH, CEP, IotAgents) (#330) From 76652d5cff048866736d79458a824d37dd6507dc 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:20:14 +0200 Subject: [PATCH 3/3] REMOVE trailing whitespace --- src/orchestrator/core/mongo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/orchestrator/core/mongo.py b/src/orchestrator/core/mongo.py index 42e7ca9e..822b2e46 100644 --- a/src/orchestrator/core/mongo.py +++ b/src/orchestrator/core/mongo.py @@ -57,7 +57,7 @@ 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")