Skip to content

Commit f847c35

Browse files
committed
Pull request #1451: missing index for statistics
Merge in CATS/clowder from stat_index to release/1.8.3 * commit 'ad9eae4433e62165078268e60cea2ba7eacda020': missing index for statistics
2 parents cf1217d + ad9eae4 commit f847c35

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1616
[CATS-1042](https://opensource.ncsa.illinois.edu/jira/browse/CATS-1042)
1717
- User-owned resources will now appear in search results regardless of space permissions.
1818
- Updating space ownership for datasets and collections will correctly reindex those resources for searches.
19+
- Missing index in statistics which would slow down system when inserting download/views.
1920

2021
### Added
2122
- GitHub Actions to compile and test the code base, create documentation and docker images.

app/services/mongodb/MongoSalatPlugin.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ class MongoSalatPlugin(app: Application) extends Plugin {
171171

172172
collection("contextld").ensureIndex(MongoDBObject("contextName" -> 1))
173173

174+
collection("statistics.users").ensureIndex(MongoDBObject("user_id" -> 1, "resource_id" -> 1))
175+
174176
collection("dtsrequests").ensureIndex(MongoDBObject("startTime" -> -1, "endTime" -> -1))
175177
collection("dtsrequests").ensureIndex(MongoDBObject("file_id" -> -1))
176178
collection("versus.descriptors").ensureIndex(MongoDBObject("fileId" -> 1))

0 commit comments

Comments
 (0)