[Bug 31937] New: cleanup_database locked a large number of patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31937 Bug ID: 31937 Summary: cleanup_database locked a large number of patrons Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz The first run of cleanupdatabase after the upgrade to 21.11 did indeed cleanup a lot ;) It seems that this statement my $expired_patrons = Koha::Patrons->filter_by_expiration_date({ days => $lock_days })->search({ login_attempts => { '!=' => -1 } }); works different than before. It must have selected patrons that had an empty dateexpiry in 20.11 ? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31937 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |critical -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31937 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |m.de.rooy@rijksmuseum.nl |ity.org | Severity|critical |normal Status|NEW |ASSIGNED --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Nothing better than being hit by your own development :) We need to refine the condition of search_unsubscribed in cleanup_database. I added a lot of refusals for another consent type (still customization), but they were picked up nicely by cleanup_database :) So no more casualties expected after all.. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31937 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31937 --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 142712 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142712&action=edit Bug 31937: Fix Patrons::search_unsubscribed - sharpen condition The condition is fine as long as we only have GDPR consents. But if you dont, you would have trouble. I know :) Lets prevent that here, although the table still has an ENUM. So double safety. Test plan: Run t/db_dependent/Koha/Patrons.t Bonus: Run cleanup_database.pl and check for unusual number of locked accounts: misc/cronjobs/cleanup_database.pl --confirm -v --sessions Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31937 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|cleanup_database locked a |Prevent cleanup_database.pl |large number of patrons |from locking too many | |accounts -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31937 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gmcharlt@gmail.com, | |kyle.m.hall@gmail.com Component|Command-line Utilities |Patrons -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31937 --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Note for QA: I did explicitly leave this on bug, not enh. Since it does not hurt to backport it too. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31937 --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Marcel de Rooy from comment #0)
The first run of cleanupdatabase after the upgrade to 21.11 did indeed cleanup a lot ;) It seems that this statement my $expired_patrons = Koha::Patrons->filter_by_expiration_date({ days => $lock_days })->search({ login_attempts => { '!=' => -1 } });
works different than before. It must have selected patrons that had an empty dateexpiry in 20.11 ?
In order to be complete, this comment was not the cause. See comment1. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31937 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 143979 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143979&action=edit k -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31937 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31937 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #142712|0 |1 is obsolete| | Attachment #143979|0 |1 is obsolete| | --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 143980 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143980&action=edit Bug 31937: Fix Patrons::search_unsubscribed - sharpen condition The condition is fine as long as we only have GDPR consents. But if you dont, you would have trouble. I know :) Lets prevent that here, although the table still has an ENUM. So double safety. Test plan: Run t/db_dependent/Koha/Patrons.t Bonus: Run cleanup_database.pl and check for unusual number of locked accounts: misc/cronjobs/cleanup_database.pl --confirm -v --sessions Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31937 --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Katrin Fischer from comment #6)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Great. Thx -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31937 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31937 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #143980|0 |1 is obsolete| | --- Comment #8 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 143982 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143982&action=edit Bug 31937: Fix Patrons::search_unsubscribed - sharpen condition The condition is fine as long as we only have GDPR consents. But if you dont, you would have trouble. I know :) Lets prevent that here, although the table still has an ENUM. So double safety. Test plan: Run t/db_dependent/Koha/Patrons.t Bonus: Run cleanup_database.pl and check for unusual number of locked accounts: misc/cronjobs/cleanup_database.pl --confirm -v --sessions Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31937 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com Depends on| |21336 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21336 [Bug 21336] GDPR: Handle unsubscribe requests automatically by optional (administrative) lock, anonymize and remove -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31937 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31937 --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org