Repository navigation
fix(search): proceed on version conflicts in deleteEntityByFields - #36497
Open
sentry[bot] wants to merge 1 commit into
Open
sentry[bot] wants to merge 1 commit into
sentry[bot] wants to merge 1 commit into
Conversation
Contributor
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
This branch has not been deployed
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.
Describe your changes:
Configures
DeleteByQueryRequestto useconflicts(Conflicts.Proceed)in bothOpenSearchEntityManager.deleteEntityByFieldsandElasticSearchEntityManager.deleteEntityByFields.Why
When deleting an entity (such as hard-deleting a test case) while search reindexing is active, concurrent updates to the target rebuild indices cause
delete_by_queryto encounter version conflicts (version_conflict_engine_exception). Without explicit conflict handling, OpenSearch/Elasticsearch defaults to aborting the operation, returning HTTP 409 Conflict as aResponseExceptionand failing child-document cleanup. Settingconflicts(Conflicts.Proceed)ignores version conflicts on already deleted/updated docs and allows the cleanup operation to complete, matching behavior across other bulk by-query endpoints.Type of change:
High-level design:
N/A — small change.
Tests:
Ingestion integration tests
Not applicable (no ingestion changes).
Playwright (UI) tests
Not applicable (no UI changes).
UI screen recording:
Not applicable — backend-only change to search index deletion.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.REVIEW.md(thepr-checklistskill runs it) and fixed every 🔴 finding, or answered it on the line below.docs/decisions/(see itsREADME.md). This description is gone fromgit logafter the squash-merge.Fixes COLLATE-BACKEND-97
@sentry <feedback>: Autofix iterates on these changes@sentry stop iterating: Autofix stops iterating on this runThis PR was automatically generated by Sentry. You can adjust this setting at any time.