Skip to content

Commit f8940ee

Browse files
authored
Not all dataset i ds found (#368)
list all ids of files that are in dataset but are not found.
1 parent 12c1d8a commit f8940ee

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ script prior to upgrading to minimize the downtime.
1515
### Added
1616
- [#228](https://github.com/clowder-framework/clowder/issues/228) api.Files jsonfile, adds two fields "downloads" and "views"
1717

18+
### Changed
19+
- MongoDB Service log error:'Not all dataset IDs found for Dataset|Folder bulk get request', now incl all the IDs notFound
20+
1821
### Added
1922
- MRI previewer for NIFTY (.nii) files.
2023
- HEIC (.heic) and HEIF (.heif) mimetypes to support new Apple iPhone image file format.

app/services/mongodb/MongoDBDatasetService.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,10 @@ class MongoDBDatasetService @Inject() (
506506
val found = Dataset.find(query).toList
507507
val notFound = ids.diff(found.map(_.id))
508508

509-
if (notFound.length > 0)
510-
Logger.error("Not all dataset IDs found for bulk get request")
509+
if (notFound.length > 0) {
510+
Logger.error("Not all dataset IDs found for [Dataset] bulk get request")
511+
Logger.error("notfound=" + notFound.toString)
512+
}
511513
return DBResult(found, notFound)
512514
}
513515

app/services/mongodb/MongoDBFolderService.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ class MongoDBFolderService @Inject() (files: FileService, datasets: DatasetServi
3838
val found = FolderDAO.find(query).toList
3939
val notFound = ids.diff(found.map(ds => ds.id))
4040

41-
if (notFound.length > 0)
42-
Logger.error("Not all dataset IDs found for bulk get request")
41+
if (notFound.length > 0) {
42+
Logger.error("Not all dataset IDs found for [Folder] bulk get request")
43+
Logger.error("notfound=" + notFound.toString)
44+
}
4345
return DBResult(found, notFound)
4446
}
4547

@@ -181,4 +183,4 @@ object FolderDAO extends ModelCompanion[Folder, ObjectId] {
181183
case None =>throw new RuntimeException("No MongoSalatPlugin");
182184
case Some(x) => new SalatDAO[Folder, ObjectId](collection = x.collection("folders")){}
183185
}
184-
}
186+
}

0 commit comments

Comments
 (0)