Bugzilla – Attachment 188437 Details for
Bug 41097
Deduping authorities script (dedup_authorities.pl) can die on duplicated ids
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41097: Don't use original record twice
Bug-41097-Dont-use-original-record-twice.patch (text/plain), 1.78 KB, created by
David Nind
on 2025-10-25 00:48:35 UTC
(
hide
)
Description:
Bug 41097: Don't use original record twice
Filename:
MIME Type:
Creator:
David Nind
Created:
2025-10-25 00:48:35 UTC
Size:
1.78 KB
patch
obsolete
>From 63da6580193b973d460277270fec640fa981d8e9 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 24 Oct 2025 15:50:35 +0000 >Subject: [PATCH] Bug 41097: Don't use original record twice > >This patch prevents us from passing the same record twice into the choose subs >to avoid a situation where the original record is not chosen as the one to keep >and we try to merge/delete the same record twice > >To test: >1 - Run the script on a test system that you can reset > perl misc/maintenance/dedup_authorities.pl -v -v --confirm -a="PERSO_NAME" >2 - Note duplication of entries in the output like: > Merging 1660,1662 into 1660. > Updated 0 biblios > Deleting 1662 > Merge done. >3 - Note how many records are merged >4 - Run again to confirm nothing is merged, i.e. the script removed the dupes >5 - Reset your DB >6 - Apply patch >7 - Run the script again >8 - Note entries no longer have duplicated ids: > Merging 1662 into 1660. >9 - Note the same number of records are merged >10 - Run again and confirm nothing is merged >11 - Sign off! > >Signed-off-by: David Nind <david@davidnind.com> >--- > misc/maintenance/dedup_authorities.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/misc/maintenance/dedup_authorities.pl b/misc/maintenance/dedup_authorities.pl >index 67cfb5d317..c4924e749d 100755 >--- a/misc/maintenance/dedup_authorities.pl >+++ b/misc/maintenance/dedup_authorities.pl >@@ -324,7 +324,7 @@ sub _choose_records { > map [ _get_id($_), > $choose_subs[0] ? $choose_subs[0]->($_) : 0, > $choose_subs[1] ? $choose_subs[1]->($_) : 0, >- $choose_subs[2] ? $choose_subs[2]->($_) : 0 ] => ( $records[0], @candidate_auths ); >+ $choose_subs[2] ? $choose_subs[2]->($_) : 0 ] => (@candidate_auths); > > return @candidate_authids; > } >-- >2.39.5
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 41097
:
188416
| 188437