Repository navigation
Fixes #37466: Skip the glossary tagged-asset rewrite on indices that hold no tagged document (backport 2.1 #37467) - #37519
Merged
Merged
Conversation
…ssary term move is approved (#37467) * Fixes #37466: Rewrite tagged assets in the background when a held glossary term move is approved Accepting a held move or rename applied it inside POST /tasks/{id}/resolve and waited on an _update_by_query across the global search alias. On a large cluster that takes ~60s and can fail with 429 (too many scroll contexts), so the reviewer's request timed out. The DB rewrite stays synchronous; the tagged-asset rewrite now starts after commit on the async executor, as an unheld move already does. * Order glossary tagged-asset rewrites and record the decision Every glossary-term tagged-asset rewrite, waited on or not, now runs on one single-threaded lane in post-commit drain order, so a later rename cannot overtake an approved move's background rewrite. Adds ADR:2026-11-10-an-approved-glossary-term-move-rewrites-tagged-assets-in-the-background. (cherry picked from commit 7e18ef8)
anuj-kumary
enabled auto-merge (squash)
November 11, 2026 06:41
Code Review ✅ Approved 🟡 Medium riskGlossary-term moves now discover matching search indices before rewriting them; aggregation misses could leave tagged assets with stale FQNs. Skips the glossary tagged-asset update-by-query when no index holds a matching document, and otherwise limits it to the indices that do, so accepting a held glossary term move no longer exhausts scroll contexts on the global alias. No issues found. VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
sonika-shah
approved these changes
Nov 11, 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.
Describe your changes:
Backport of #37467 to
2.1. Fixes #37466.Accepting a held glossary-term move ran
updateGlossaryTermByFqnPrefixas an_update_by_queryagainst the global_allalias, opening a scroll context on every shard. On a busy cluster that exhaustssearch.max_open_scroll_context, the engine backs off for ~60s and fails with a 429, soPOST /tasks/{id}/resolveoutlasts its caller (GlossaryTermMoveApproval.spec.tsin nightly AUT).OpenSearchEntityManagerandElasticSearchEntityManagernow run a size-0 search with the same prefix query and a terms aggregation on_indexfirst:SearchIndexRetryQueue; a full 1000-bucket page falls back to the whole alias.Recorded in
ADR:2026-11-11-a-global-alias-rewrite-targets-only-the-indices-holding-a-match(included).Cherry-picked from
7e18ef87ed6(git cherry-pick -x), applied cleanly with no conflicts.Type of change:
Tests:
-U0diffs match the original merge commit line-for-line.OpenSearchEntityManagerUpdateByQueryRetryTest+ElasticSearchEntityManagerUpdateByQueryRetryTeston this branch (JDK 21): 14 run, 0 failures (same as the original PR).openmetadata-integration-teststest-compileon this branch: BUILD SUCCESS (the newWorkflowDefinitionResourceITtest compiles against 2.1).SearchDocs.awaitDoc/tagFqns,moveFixture,deployTermGateWorkflow,TableTestFactory.createWithName,PENDING_CHANGE_HEADER) all exist on2.1.Checklist: