-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Drop old galaxy_session records #19872
Open
jdavcs
wants to merge
12
commits into
galaxyproject:dev
Choose a base branch
from
jdavcs:dev_13922_session
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+243
−21
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Why: all sessions may have been deleted
b536082
to
39beaf7
Compare
39beaf7
to
df126a2
Compare
test failures unrelated. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ref #13992
Is 1 month a safe cut off for deleting old sessions? If so, main has 173M session records that are more than 2 months old (checked against updated_time; if checked against last_action value, then 151M).
This introduces some minor duplication (see the history pruning script, as well as admin documentation). I'll refactor as needed when adding more such scripts (as per #13992).
A note on prev_session_id:
The
galaxy_session.prev_session_id
field should be defined as a self-referencing foreign key, but it is not. Instead, it's an integer field which allows null values. Adding a foreign key constraint is trivial; however, the migration process would have to include fixing existing data by setting to null any existing values that do not correspond to an existing galaxy_session record. For databases like main, which contains 173M galaxy_session records, this process requires special handling, and the migration may take a long time. In this case it seems to be not worth the effort.UPDATE: we do need the previous session id to be available; however, it is not accessed from the code base and, from a practical standpoint, a foreign key constraint is not needed.
To do:
How to test the changes?
(Select all options that apply)
License