Skip to content

fix(search): proceed on version conflicts in deleteEntityByFields - #36497

Open
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/delete-by-query-version-conflicts
Open

sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/delete-by-query-version-conflicts

Conversation

@sentry

@sentry sentry Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Describe your changes:

Configures DeleteByQueryRequest to use conflicts(Conflicts.Proceed) in both OpenSearchEntityManager.deleteEntityByFields and ElasticSearchEntityManager.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_query to encounter version conflicts (version_conflict_engine_exception). Without explicit conflict handling, OpenSearch/Elasticsearch defaults to aborting the operation, returning HTTP 409 Conflict as a ResponseException and failing child-document cleanup. Setting conflicts(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:

  • Bug fix

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:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.
  • For a UI feature or feature task: as part of PR creation, I ran the PR build in Docker with sample data and embedded a verified GitHub-hosted recording plus build/health evidence above (or explained why this requirement is not applicable).
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.
  • Self-review: I reviewed the final diff against REVIEW.md (the pr-checklist skill runs it) and fixed every 🔴 finding, or answered it on the line below.
  • Decision check: if this PR decides something the next contributor could undo — a schema field, REST path or format another component or repo must agree with, a new default or limit, an ordering that must hold, or a rule stated only in this description — it adds a record under docs/decisions/ (see its README.md). This description is gone from git log after the squash-merge.
  • I have added a test that covers the exact scenario we are fixing. For complex issues, comment the issue number in the test for future reference.

Fixes COLLATE-BACKEND-97

@sentry <feedback>: Autofix iterates on these changes
@sentry stop iterating: Autofix stops iterating on this run

This PR was automatically generated by Sentry. You can adjust this setting at any time.

@sentry
sentry Bot requested a review from a team as a code owner October 28, 2026 23:41
@sentry
sentry Bot requested a review from harshach October 28, 2026 23:41
@github-actions

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

This branch has not been deployed

No deployments
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.

0 participants