Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MODSOURCE-854] Use deleteRecordBy id for soft delete of authority #668

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

RomanChernetskyi
Copy link
Contributor

Purpose

Update soft delete logic for Marc Authority

Approach

Use deleteRecordBy id for soft delete of authority

Jira

https://folio-org.atlassian.net/browse/MODSOURCE-854

LOG.info("handlePayload:: Handling 'delete' event for the record id = {}", payloadRecord.getId());
recordService.updateRecordsState(payloadRecord.getMatchedId(), RecordState.DELETED, RecordType.MARC_AUTHORITY, payload.getTenant())
recordService.deleteRecordById(payloadRecord.getMatchedId(), IdType.RECORD, okapiHeaders)
.recover(throwable -> throwable instanceof NotFoundException ? Future.succeededFuture() : Future.failedFuture(throwable))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RomanChernetskyi Let's log here smth. At the debug level - that record was not found (with specific Id). And warn level - with an error message and cause.

# Conflicts:
#	mod-source-record-storage-server/src/main/java/org/folio/consumers/AuthorityDomainKafkaHandler.java
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.

6 participants