https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31925

--- Comment #61 from Martin Renvoize (ashimema) 
<[email protected]> ---
Re comment 58/60: I reproduced this directly (KTD, Zebra) rather than guessing,
since "Elastic-only" didn't match what I'd expect from the code -
build_authorities_query_compat's Zebra implementation already passes the
thesaurus name straight through to the existing Subject-heading-thesaurus Zebra
index (indexed from 008/11, falling back to 040$f for 'z' - see
authority-zebra-indexdefs.xsl), so there's no code path here that's actually
Elasticsearch-specific.
With AutoCreateAuthorities, AutoLinkBiblios and LinkerConsiderThesaurus all on,
under Zebra:
- Saving a bib with a new FAST 650 heading, waiting for Zebra's indexing daemon
to catch up (a few seconds), then saving a second bib with the same FAST
heading: the second heading links to the authority created by the first, no
duplicate. This is the fix working as designed.
- Saving the same two bibs back-to-back with no pause: a duplicate authority is
created, because the first authority isn't in the Zebra index yet when the
second heading is searched.
I then checked whether that second case is specific to this bug's
thesaurus-aware logic, and it isn't: the same duplicate-on-rapid-succession
behaviour reproduces with LinkerConsiderThesaurus OFF and a plain LCSH heading
(no $2) - it's a pre-existing race between AutoCreateAuthorities and Zebra's
asynchronous indexing daemon (rebuild_zebra.pl -daemon, polling every few
seconds), not something this bug introduces or that's specific to thesaurus
matching. Elasticsearch indexes near-synchronously within the same request, so
that race window is far less likely to be hit there, which is almost certainly
why manual click-through testing surfaced it on Zebra but not ES.
Given that, I don't think gating this to Elasticsearch-only is the right fix -
the underlying logic is search-engine agnostic and works correctly on Zebra
given normal indexing latency, and restricting it would take away legitimate
benefit from Zebra sites that aren't hammering the same new heading in
immediate succession. Instead I've added a follow-up patch documenting the
dependency on the search index being current directly on the
LinkerConsiderThesaurus system preference, so testers/admins know to expect
this.
Attaching that patch now (doc-only, no code change).

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to