Skip to content

Comments

fix(indexing): Update instance_call_number tenantId on Instance becoming shared#904

Merged
viacheslavkol merged 6 commits intomasterfrom
MSEARCH-1168
Feb 23, 2026
Merged

fix(indexing): Update instance_call_number tenantId on Instance becoming shared#904
viacheslavkol merged 6 commits intomasterfrom
MSEARCH-1168

Conversation

@viacheslavkol
Copy link
Contributor

@viacheslavkol viacheslavkol commented Feb 19, 2026

Purpose

Update instance_call_number tenantId on Instance becoming shared

Approach

  • 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

Changes Checklist

  • API Changes: Document any API paths, methods, request or response bodies changed, added, or removed.
  • Database Schema Changes: Indicate any database schema changes and their impact. Confirm that migration scripts were created.
  • Interface Version Changes: Indicate any changes to interface versions.
  • Interface Dependencies: Document added or removed dependencies.
  • Permissions: Document any changes to permissions.
  • Logging: Confirm that logging is appropriately handled.
  • Unit Testing: Confirm that changed classes were covered by unit tests.
  • Integration Testing: Confirm that changed logic was covered by integration tests.
  • Manual Testing: Confirm that changes were tested on local or dev environment.
  • NEWS: Confirm that the NEWS file is updated with relevant information about the changes made in this pull request.

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.

…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
@viacheslavkol viacheslavkol self-assigned this Feb 19, 2026
@viacheslavkol viacheslavkol marked this pull request as ready for review February 19, 2026 14:53
@viacheslavkol viacheslavkol requested a review from a team as a code owner February 19, 2026 14:53
@sonarqubecloud
Copy link

@viacheslavkol viacheslavkol merged commit 06e2c24 into master Feb 23, 2026
28 of 29 checks passed
@viacheslavkol viacheslavkol deleted the MSEARCH-1168 branch February 23, 2026 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants