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
outstanding 5.3 DB changes #4608
Conversation
deletes orphaned non-sharable annotations and fixes "Foo" values in DB
would be strange to find any, but just in case
I do really like the |
Tested the upgrade script against the latest version of the valuable DB which had the following content pre-ugrade:
After running the upgrade scripts, everything is cleaned up as expected:
Note #4585 should ensure the deletion of these orphaned annotations in new servers. Moving away from "Foo" is certainly a good idea. Could "Pending..." be misleading in the sense it gives the impression that the SHA1 is getting calculated? That being said, I do not have any better suggestion other than "N/A" if we don't want to go for "". |
"Pending..."'s otherwise used by |
Fair enough. I have no strong opinion on the |
OMERO.web changes already done in eab13c5. |
FOr information, the query on the nigthshade DB leads to ~30K annotations that would be removed by this upgrade step. @kennethgillen / @joshmoore: is there any additional information we should fetch that would help us stay on the safe side before merging this PR? |
Note also that my testing reveals that when deleting a rating in Insight, that rating is actually left behind in the DB. (This is fixed by #4585.) I'd not be shocked if there are other code paths that act similarly. |
We use orphaned |
Could certainly limit deletion by namespace so any unexpected are left intact. |
The |
👍 Is there a placeholder for the production DBs investigation including the query script and a summary of the results? |
I know of only https://trello.com/c/QrfLtInf/68-should-we-really-be-creating-the-value-foo-in-our-user-s-production-databases which isn't the ideal placeholder. |
My suggestion is that we have this script delete only those orphan non-sharable annotations that have a NULL namespace or one starting with |
My gut feeling is that we leave this as an optional part of the database upgrade, document it as such and allow people to run it at their own risk. I don't like the premise of deleting rows in people's databases. |
Okay, happy to go with that unless anyone thinks otherwise. |
pixels
table.Neither old nor new images should have a
Pixels.sha1
of "Foo". For instance,should return no IDs.
Also, there should no longer be any comments, ratings, etc. that are orphaned. To create synthetic ones before upgrade just delete their links directly using
psql
or via CLI, e.g.,Of course, orphaned tags, attachments, etc., ought to remain.