Skip to content
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

Add violation hash and index #66 #92

Merged
merged 2 commits into from
Jan 29, 2025
Merged

Conversation

bwalkerl
Copy link
Contributor

@bwalkerl bwalkerl commented Jan 10, 2025

Adding the hash can take a long time on sites with a large amount of data. This shouldn't be a problem for sites properly curating data, but is a realistic possibility for sites that enabled report mode and have done nothing with it to have many millions of rows. As such, it was proposed to try and have this correspond with an upgrade.

To accomplish this the MOODLE_500_STABLE branch was created. It is essentially a placeholder that only contains this update for now, but proper support for Moodle 5.0 will be added at a later time if any changes are needed.

@bwalkerl bwalkerl marked this pull request as draft January 10, 2025 05:51
@bwalkerl bwalkerl mentioned this pull request Jan 29, 2025
@bwalkerl bwalkerl changed the base branch from MOODLE_401_STABLE to MOODLE_500_STABLE January 29, 2025 04:14
@bwalkerl bwalkerl changed the title Improve report performance Add violation hash and index #66 Jan 29, 2025
@bwalkerl bwalkerl marked this pull request as ready for review January 29, 2025 04:21
global $DB;

// Get a recordset of all the unique violateddirect and blockeddomain pairs.
$recordset = $DB->get_recordset_sql("
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this thing could be pure db side, mysql and postgres both have a sha1 function

split this into a new issue for later: #97

@brendanheywood brendanheywood merged commit 24164bb into MOODLE_500_STABLE Jan 29, 2025
7 checks passed
@brendanheywood brendanheywood deleted the 66-add-index branch January 29, 2025 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants