fix(indexing): Update instance_call_number tenantId on Instance becoming shared#904
Merged
viacheslavkol merged 6 commits intomasterfrom Feb 23, 2026
Merged
fix(indexing): Update instance_call_number tenantId on Instance becoming shared#904viacheslavkol merged 6 commits intomasterfrom
viacheslavkol merged 6 commits intomasterfrom
Conversation
…ing shared - add instance sharing events identification to PopulateInstanceBatchInterceptor when consumed in one batch - Remove redundant sharing logic from extractors - Remove redundant shadow copy logic from InstanceChildrenResourceService - Add call number tenant update to InstanceChildrenResourceService for shared new Instance events Closes: MSEARCH-1168
psmagin
reviewed
Feb 20, 2026
src/test/java/org/folio/indexing/IndexingInstanceCallNumberConsortiumIT.java
Outdated
Show resolved
Hide resolved
psmagin
approved these changes
Feb 23, 2026
SvitlanaKovalova1
approved these changes
Feb 23, 2026
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Purpose
Update instance_call_number tenantId on Instance becoming shared
Approach
Changes Checklist
Related Issues
MSEARCH-XXX
List any Jira issues related to this pull request.
Learning and Resources (if applicable)
We're saving only original instances in database, not shadow copies. When instance is becoming shared - it's created in central tenant and mod-search updates existing record in postgres, overwriting it's tenant. Event for updating member instance source to have a "CONSORTIUM-" prefix is ignored.
Since call-number relates to item record which wasn't changed - it wasn't updated.
Now call-number is updated when shared instance is created defined by comparing metadata createdDate/updatedDate after instance is retrieved from database via a background job. This still will produce some unnecessary calls to database since not all shared instances creation are instance sharing events.
Shadow copy logic was removed from InstanceChildrenResourceService and extractors since this functionality is used by a background job that fetches records from database where no shadow copies are stored.