-
Notifications
You must be signed in to change notification settings - Fork 964
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
refactor: store hashed remote address on journals #13595
refactor: store hashed remote address on journals #13595
Conversation
6016541
to
ae36a83
Compare
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
Hopefully there's enough operator toggles to tune this run, as there's a large amount of records in the database. This should hopefully allow for balancing load vs locking. Signed-off-by: Mike Fiedler <miketheman@gmail.com>
bde4bd7
to
8c122f8
Compare
|
||
# Update the rows | ||
session.add_all(unhashed_rows) | ||
session.commit() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking deeply about one thing, which is: Do we want to ensure that an IpAddress object and corresponding row exists in the DB before we obliterate the data?
probably not is my gut reaction. since for all data since #6339 (August, 2019) there already exists a corresponding ProjectEvent that has it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm now with the date in mind.... and the fact that the IP addresses exist on ProjectEvents... dropping the column altogether may be the right call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As much as I enjoyed writing the CLI tool (and the tests for it!) I'd be much happier to remove the column instead. I'll work that up instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Closing, the alternative was to drop it like it was hot. |
Another step towards #8158 .
Starts storing only hashed IP addresses in
JournalEntry.submitted_from
text column from merge-time forward for any new Journals.Provides a CLI command: