Skip to content

Commit

Permalink
Merge pull request #336 from telefonicaid/issue-335
Browse files Browse the repository at this point in the history
ADD new indexes for Orion
  • Loading branch information
AlvaroVega authored Jul 13, 2022
2 parents f279990 + 76652d5 commit 10d0e92
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
5 changes: 5 additions & 0 deletions src/orchestrator/core/mongo.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ def createOrionIndexes(self, SERVICE_NAME):
("_id.id", 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))

Expand Down

0 comments on commit 10d0e92

Please sign in to comment.