BCDA-APS / gemviz

Data visualization for tiled
https://bcda-aps.github.io/gemviz/
Other
4 stars 0 forks source link

raise custom exception and catch it if catalog too big to page #164

Closed prjemian closed 1 year ago

prjemian commented 1 year ago
prjemian commented 1 year ago

Confirmed with @danielballan that paging larger catalogs is a limitation of an early decision in databroker use of MongoDM. There is a fix possible for any catalog that presents this problem. The fix, which relies on use of the mongosh program, adds additional indices that optimize paging through larger catalogs.

$ mongosh "${CATALOG_URI}"
db.run_start.createIndex({"scan_id": -1, "_id": -1}, {unique: true})
db.run_start.createIndex({"time": -1, "_id": -1}, {unique: true})
db.run_start.createIndex({"scan_id": 1, "_id": -1}, {unique: true})
db.run_start.createIndex({"scan_id": 1}, {unique: false})

Eventually, this fix will be pushed to a release so that any (and all) new catalogs will be created with these indices.

prjemian commented 1 year ago

Obviously, that change to a MongoDB catalog should be done only by someone who has the skills to undo it if a problem occurs.

prjemian commented 1 year ago

Adding a modal dialog to show the message:

image

prjemian commented 1 year ago

@rodolakis Ready for review