Bugzilla – Attachment 107083 Details for
Bug 26024
Purge undone of zebraqueue in cleanup_database.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26024: Purge undone of zebraqueue in cleanup_database.pl
Bug-26024-Purge-undone-of-zebraqueue-in-cleanupdat.patch (text/plain), 1.65 KB, created by
Fridolin Somers
on 2020-07-20 10:00:44 UTC
(
hide
)
Description:
Bug 26024: Purge undone of zebraqueue in cleanup_database.pl
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2020-07-20 10:00:44 UTC
Size:
1.65 KB
patch
obsolete
>From fd02420ab8d40053906af75634104b5bb45f2dfa Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Mon, 20 Jul 2020 11:48:24 +0200 >Subject: [PATCH] Bug 26024: Purge undone of zebraqueue in cleanup_database.pl > >Purge script misc/cronjobs/cleanup_database.pl with --zebraqueue DAYS will delete entries from zebraqueue table with done=1 > >We now start to use Elasticsearch only so entries of zebraqueue with done=0 stay in database. > >I propose we purge all entries in cleanup_database.pl. >Even with zebra, if indexing does not occur after several days (30 by default), there is a problem and one need a full rebuild. > >Test plan: >1) Use an database with entries in zebraqueue older than 7 days >2) Stop zebra indexing >3) Count entries older than 7 days : >mysql > select count(*),done from zebraqueue where time < date_sub(curdate(), INTERVAL 7 DAY) group by done; >4) Simulate done=0 : >mysql > update zebraqueue set done=0; >5) Run misc/cronjobs/cleanup_database.pl --zebraqueue 7 -v >6) Re run 3) you have no results >--- > misc/cronjobs/cleanup_database.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/misc/cronjobs/cleanup_database.pl b/misc/cronjobs/cleanup_database.pl >index a1a9cae442..8a6224ae55 100755 >--- a/misc/cronjobs/cleanup_database.pl >+++ b/misc/cronjobs/cleanup_database.pl >@@ -236,7 +236,7 @@ if ($zebraqueue_days) { > q{ > SELECT id,biblio_auth_number,server,time > FROM zebraqueue >- WHERE done=1 AND time < date_sub(curdate(), INTERVAL ? DAY) >+ WHERE time < date_sub(curdate(), INTERVAL ? DAY) > } > ); > $sth->execute($zebraqueue_days) or die $dbh->errstr; >-- >2.27.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26024
:
107083
|
172779