-
Notifications
You must be signed in to change notification settings - Fork 20
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
INTEGRITY: Rewrite project in python #24
base: integrity
Are you sure you want to change the base?
Conversation
user_fileset_funtions.py
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.
Very solid start. I put some questions and notes.
Also, please update the README with deployment instructions
user = f'cli:{getpass.getuser()}' | ||
create_log(escape_string(category_text), user, escape_string(log_text), conn) | ||
|
||
def compare_filesets(id1, id2, conn): |
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 think this will not scale well since you're basically doing quadratic computation.
I propose the following approach:
*Pick a file from the incoming fileset
- Select from the fileset set of fileset ids that have these files with checksum matching. should be a single SELECT
- If the list is too big, like, over 100 entries (low chance), add one more file
- Iterate over the resulting files, or even ask SQL to do it with UNION ALL
Eventually, we will have like 15k filesets, so quadratic computations are not feasible
No description provided.