-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Experimenter group cache #166
base: master
Are you sure you want to change the base?
Conversation
This is because modifying a group's permissions is performed by the Chmod2 infrastructure 1 which does not use Hibernate entities to perform changes to the object graph. When a Chmod2 request completes processing of an object it publishes an This can be picked up if the
Thinking about this a little more I'm now of the opinion that we need to react to changes by making incremental updates that synchronize database state with in memory state. Invalidating the entire cache whenever any of these objects are modified is not a viable solution. If 50 users are added to a group we cannot be refreshing the entire cache 50 times; that's not even an extreme use case. At least we have the entities in hand for everything but the permissions change so should be able to update things very quickly without roundtripping to the database.
Based on this and what I've mentioned above I don't think the Footnotes |
Fixes #165.
Creates a simple in-memory cache which contains all the relevant data in the ExperimenterGroup and ExperimenterGroupMap tables to perform the
isRelatedUser
check.Some things that still need to be implemented/fixed:
The problem with 1 and 2 is that things will continue to "work" even though something has gone wrong. Without checking the logs it's possible nobody will ever notice. With 2, the performance might improve again after the refresh, but if that fails too it's unclear how anyone would determine that something needed to be fixed. The problem with 3 is that for a period the user will either get data they shouldn't have access to or fail to get data they should, but it's not essential data for OMERO to run. Similarly to 1 and 2 it's not clear how we would find out an error had happened on a system which entered such a state. 4 is probably a bad idea but we would learn about the error quickly. Is there some way within the server to basically relay a message to the QA endpoint?
Testing:
There are a few different scenarios which need to be tested: