Bugzilla – Attachment 95171 Details for
Bug 23986
Batch Record Deletion does not remove records from Elasticsearch search index
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23986: Remove sort from batch bib deletion
Bug-23986-Remove-sort-from-batch-bib-deletion.patch (text/plain), 1.34 KB, created by
Nick Clemens (kidclamp)
on 2019-11-07 16:40:06 UTC
(
hide
)
Description:
Bug 23986: Remove sort from batch bib deletion
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2019-11-07 16:40:06 UTC
Size:
1.34 KB
patch
obsolete
>From 898a0c8f5091c5f72044dfed97db7f7d43f1fb73 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 7 Nov 2019 16:36:31 +0000 >Subject: [PATCH] Bug 23986: Remove sort from batch bib deletion > >After lots and lots fo digging, I removed the sort from this loop. Somehow, this allows the >ES records to be deleted. I do not understand this patch, but it works. > >Possibly we need to sort the error arrays after the fact > >To test: >1 - Have or create a bib >2 - Go to Tools->Batch record deletion >3 - Click 'Enter a list of record numbers' >4 - Enter the biblionumber' >5 - Confirm deletion >6 - Search for the record, it still appears >7 - Apply patch, restart all the things >8 - Repeat 1-6 >9 - This time the record is deleted >--- > tools/batch_delete_records.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/tools/batch_delete_records.pl b/tools/batch_delete_records.pl >index 1f0e56a45e..2202aff98e 100755 >--- a/tools/batch_delete_records.pl >+++ b/tools/batch_delete_records.pl >@@ -132,7 +132,7 @@ if ( $op eq 'form' ) { > total_records => 0, > total_success => 0, > }; >- RECORD_IDS: for my $record_id ( sort { $a <=> $b } @record_ids ) { >+ RECORD_IDS: for my $record_id ( @record_ids ) { > $report->{total_records}++; > next unless $record_id; > $schema->storage->txn_begin; >-- >2.11.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 23986
:
95171
|
95177
|
95188
|
95229