Skip to content

Fixes #37466: Skip the glossary tagged-asset rewrite on indices that hold no tagged document - #37467

Merged
anuj-kumary merged 7 commits into
mainfrom
anuj-kumary/uvml1
Nov 11, 2026
Merged

anuj-kumary merged 7 commits into
mainfrom
anuj-kumary/uvml1

Conversation

@anuj-kumary

@anuj-kumary anuj-kumary commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Describe your changes:

Fixes #37466

GlossaryTermMoveApproval.spec.ts has failed or been flaky in nightly AUT on MySQL and Postgres since it landed on 2026-11-03. The reviewer's POST /api/v1/tasks/{id}/resolve takes about 61s, longer than the test's 60s wait.

Root cause (from the AUT collate.log): accepting a held move runs GlossaryTermRepository.updateParent → updateAssetIndexes → updateGlossaryTermByFqnPrefix, which sends an _update_by_query?refresh=true to the global _all alias. An update-by-query opens a scroll context on every shard it reaches, whether or not anything there matches. Across _all that is one per shard of every index (more during a reindex, when *_rebuild_* indices are aliased in). On the busy AUT node that exhausts search.max_open_scroll_context (500). The engine then retries the rejected scroll with its built-in backoff: 500ms start, 11 retries, about 59.5s in total. Finally it fails with 429 Trying to create too many scroll contexts:

Slow request - POST v1/tasks/8a5d5926-…/resolve, total: 61278ms, db: 64ms, phaseExclusive: {resourceCreate: 61037ms, …}
ERROR Error while updating glossary term FQN: … /…_all/_update_by_query?refresh=true … 429 Too Many Requests

The term in the test has no tagged assets, so all of that time is spent on a rewrite with nothing to update.

Fix (OpenSearchEntityManager and ElasticSearchEntityManager, updateGlossaryTermByFqnPrefix): before the update-by-query, run a size-0 search with the same prefix query and a terms aggregation on _index. A plain search opens no scroll contexts.

  • No index holds a tagged document: no update-by-query runs at all.

  • Otherwise: the update-by-query (and its reconciler refresh) targets only the indices that hold a match, instead of every shard behind _all.

  • The search reports a failed shard: the rewrite is not attempted and the rename goes to SearchIndexRetryQueue, so a busy shard can't silently drop an index.

  • The 1000-bucket page is full: it may have been cut short, so the update falls back to the whole alias.

The rule is recorded in ADR:2026-11-11-a-global-alias-rewrite-targets-only-the-indices-holding-a-match.

The rewrite stays synchronous in the request, exactly as on main, so ordering, read-your-write behaviour and failure handling (SearchIndexRetryQueue) are unchanged.

An earlier revision of this PR moved the rewrite to a background lane instead. Review showed that created cross-server ordering, delete-after-move, cross-glossary latency, restart-durability and cache-invalidation problems. It has been reverted along with its decision record.

Type of change:

  • Bug fix

High-level design:

N/A — small change (two search managers, one query added before an existing call, one decision record).

Tests:

Use cases covered

  • Accepting a held move of a term with no tagged assets runs no update-by-query, and resolve returns immediately.
  • Accepting a held move of a term that tags a table rewrites that table's search document to the new FQN.
  • Glossary, tag and classification renames and moves still rewrite their tagged assets and descendants in search.
  • Held, rejected, partially decided and ungated moves behave as before.

Unit tests

  • OpenSearchEntityManagerUpdateByQueryRetryTest, ElasticSearchEntityManagerUpdateByQueryRetryTest:
    • aGlossaryPrefixRenameNothingIsTaggedWithRunsNoUpdateByQuery — fails on main, which always sends the update-by-query.
    • aGlossaryPrefixRenameRewritesOnlyTheIndicesHoldingATaggedDocument — fails on main, which targets all.
    • The existing prefix-rename tests now stub the matching-indices search.
    • aGlossaryPrefixRenameWhoseSearchMissedAShardGoesToTheRetryQueue — a failed shard queues a retry and runs no update.
    • aGlossaryPrefixRenameMatchingAFullPageOfIndicesRewritesTheWholeAlias — a full page targets the alias.
    • Result: 14 run, 0 failures.

Backend integration tests

  • Added WorkflowDefinitionResourceIT#test_approvedGlossaryTermMoveRewritesTaggedAssetsInSearch: tags a table with the term, approves a held move, and checks the table's search document carries the new tag FQN.
  • Ran locally on both engines (mysql-elasticsearch and postgres-opensearch), re-run on ddafaadfa15:
    • The new test plus the 4 existing held-move tests (global-state lane): 5/5 on each engine.
    • RenameCascadeSearchIT (glossary/tag/classification rename and move cascades, parallel lane): 9/9 on each engine.
  • Not run locally: the rest of WorkflowDefinitionResourceIT, which the merge queue runs.

Playwright (UI) tests

  • Not applicable (no UI changes). Ran the affected spec playwright/e2e/Features/Glossary/GlossaryTermMoveApproval.spec.ts against a server built from this branch at 83cc7a7cbcd (MySQL + Elasticsearch): 4 passed. The server log shows No search documents are tagged under PwMoveGate….Revenue….NetRevenue…; nothing to rewrite on the resolve thread, and resolve returned 200.

Playwright GlossaryTermMoveApproval passing

Manual testing performed

  1. Built the branch dist, ran migrations into a separate MySQL schema, started the server on :8605 and the Vite UI on :3020.
  2. Ran the spec above and checked the server log for the skipped rewrite and the 200 from resolve.

The 429 itself only reproduces on a scroll-saturated cluster like nightly AUT. The next nightly run is the end-to-end check.

UI screen recording:

Not applicable — backend-only fix.

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: N/A

  • For a UI feature or feature task: N/A

  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

  • Self-review: I reviewed the final diff against REVIEW.md.

  • Decision check: adds docs/decisions/2026-11-11-a-global-alias-rewrite-targets-only-the-indices-holding-a-match.md.

  • I have added a test that covers the exact scenario we are fixing (unit tests for the skipped and narrowed update-by-query; the IT and Playwright spec for the approved move).

🤖 Generated with Claude Code

…ssary 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.
@anuj-kumary
anuj-kumary requested a review from a team as a code owner November 10, 2026 06:36
@anuj-kumary
anuj-kumary requested a review from harshach November 10, 2026 06:36
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR checks passed

The linked issue has a description and all required Shipping project fields set. Thanks!

@github-actions github-actions Bot added the UI UI specific issues label Nov 10, 2026
@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!

@anuj-kumary anuj-kumary added the safe to test Add this label to run secure Github workflows on PRs label Nov 10, 2026
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.
@anuj-kumary
anuj-kumary enabled auto-merge (squash) November 11, 2026 03:37
A reviewer's accept returns as quickly as an unheld move does. The cost is that rewrites queue
behind one another on a server: a PATCH rename can wait for a slow background rewrite that started
before it. Ordering is per server and starts at the post-commit drain, so it does not cover two
servers, or two commits whose drains run in the opposite order to their commits. Neither was

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Cross-server rename after an approval leaves search on a stale FQN (new with this PR).

Reviewer accepts A→B on server 1, then the term is renamed B→C on server 2. Server 2's rewrite runs first and matches 0 docs (they still say A); server 1's background rewrite lands afterwards and writes B. Final state: DB tags …NetRevenueX (C), search doc …Costs.NetRevenue (B); a search for the current FQN returns 0 assets, still wrong minutes later, nothing in the retry queue.

On main the same sequence ends correct, because resolve only returns after the rewrite. So "Neither was covered before either" doesn't hold for sequential actions: before, only two truly concurrent requests could race; now one user doing two things in a row can hit it.

Tested locally: two servers sharing one MySQL + Elasticsearch, a proxy delaying the approved move's _update_by_query by 20s, compared against this branch with only its two Java files reverted to main.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks, this was a good catch. All six findings come from the background lane, so I took a different approach in 83cc7a7 and reverted the lane and its ADR. The rewrite is synchronous again, exactly as on main. The 60s turned out to be the engine retrying a rejected scroll: an update-by-query on _all opens a scroll context on every shard of every index even when nothing matches. updateGlossaryTermByFqnPrefix now runs a size-0 search with an _index terms aggregation first. When nothing is tagged it skips the update-by-query entirely (the AUT case: the test term has no tagged assets); otherwise it rewrites only the indices that hold a match.

For this one: with the rewrite back inside resolve, an A→B approval finishes before a later B→C rename on any server can start, so the sequence ends on C as it does on main.

.updateGlossaryTermByFqnPrefix(GLOBAL_SEARCH_ALIAS, oldFqn, newFqn, TAGS_FQN);
searchRepository.deferIfFlushScopeActive(
() -> {
final Future<?> queued = ASSET_REWRITES.submit(rewrite);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Deleting a term right after its move is approved leaves the deleted term on assets in search.

The term-delete search cleanup (updateChildren on tags.tagFQN) doesn't go through ASSET_REWRITES, so it runs before the queued move rewrite. Sequence I saw: delete cleanup at +1s finds nothing (docs still have the old FQN), then the move rewrite at +20s writes the new FQN back onto the table. Final: DB has no tag, search doc tagged with the deleted term. On main the tag is removed. This happens on a single server too. Glossary renames (GlossaryRepository) also bypass the lane.

Tested locally: two servers sharing one MySQL + Elasticsearch, a proxy delaying the approved move's _update_by_query by 20s, compared against this branch with only its two Java files reverted to main.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks, this was a good catch. All six findings come from the background lane, so I took a different approach in 83cc7a7 and reverted the lane and its ADR. The rewrite is synchronous again, exactly as on main. The 60s turned out to be the engine retrying a rejected scroll: an update-by-query on _all opens a scroll context on every shard of every index even when nothing matches. updateGlossaryTermByFqnPrefix now runs a size-0 search with an _index terms aggregation first. When nothing is tagged it skips the update-by-query entirely (the AUT case: the test term has no tagged assets); otherwise it rewrites only the indices that hold a match.

For this one: the move's rewrite completes before resolve returns, so a delete that follows sees the moved FQN and its updateChildren cleanup removes the tag, as on main. Glossary renames are unaffected because there's no lane to bypass any more.

"conceptMappings,references,relatedTerms,synonyms,style";
private static final String PARENT_OF_RELATION_TYPE = "parentOf";
// ponytail: one lane per server for every glossary; per-glossary lanes if rewrites queue up.
private static final ExecutorService ASSET_REWRITES =

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

One lane per server makes unrelated renames wait behind a slow approved rewrite.

Renaming a term in a different glossary right after an approval took 19.5s (main: 0.3s); it queued behind the approved move's rewrite. On the AUT cluster that rewrite took about 60s, so parallel specs that rename glossary terms on the same server could start hitting their own 60s waits, which would move the flakiness rather than remove it. Per-glossary (or per-FQN-prefix) lanes would keep the ordering without the cross-glossary stall.

Tested locally: two servers sharing one MySQL + Elasticsearch, a proxy delaying the approved move's _update_by_query by 20s, compared against this branch with only its two Java files reverted to main.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks, this was a good catch. All six findings come from the background lane, so I took a different approach in 83cc7a7 and reverted the lane and its ADR. The rewrite is synchronous again, exactly as on main. The 60s turned out to be the engine retrying a rejected scroll: an update-by-query on _all opens a scroll context on every shard of every index even when nothing matches. updateGlossaryTermByFqnPrefix now runs a size-0 search with an _index terms aggregation first. When nothing is tagged it skips the update-by-query entirely (the AUT case: the test term has no tagged assets); otherwise it rewrites only the indices that hold a match.

For this one: there's no shared lane, so unrelated renames never queue behind an approved move. Each rename also now touches only the indices that hold its tagged documents, so it gets cheaper rather than slower.

() -> {
final Future<?> queued = ASSET_REWRITES.submit(rewrite);
if (!inBackground) {
awaitAssetRewrite(queued, oldFqn, newFqn);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

A PATCH rename right after an approval now blocks for the whole background rewrite.

Approve A→B, then rename the same term on the same server: the PATCH took 19.7s (main: 0.7s). The ordering is right (final search tag is C), but the user doing the rename now pays the full approved-move rewrite time. Worth stating in the ADR's Consequences with the numbers, since this is the latency the PR moves off the reviewer.

Tested locally: two servers sharing one MySQL + Elasticsearch, a proxy delaying the approved move's _update_by_query by 20s, compared against this branch with only its two Java files reverted to main.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks, this was a good catch. All six findings come from the background lane, so I took a different approach in 83cc7a7 and reverted the lane and its ADR. The rewrite is synchronous again, exactly as on main. The 60s turned out to be the engine retrying a rejected scroll: an update-by-query on _all opens a scroll context on every shard of every index even when nothing matches. updateGlossaryTermByFqnPrefix now runs a size-0 search with an _index terms aggregation first. When nothing is tagged it skips the update-by-query entirely (the AUT case: the test term has no tagged assets); otherwise it rewrites only the indices that hold a match.

For this one: a PATCH right after an approval no longer waits on anything queued. Each request pays only for its own rewrite, which is now restricted to the matching indices, or skipped when nothing is tagged.

// ponytail: one lane per server for every glossary; per-glossary lanes if rewrites queue up.
private static final ExecutorService ASSET_REWRITES =
Executors.newSingleThreadExecutor(
Thread.ofVirtual().name("glossary-asset-rewrite-", 0).factory());

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Queued rewrites are lost on restart.

ASSET_REWRITES is in-memory and never shut down. If a pod restarts (rolling deploy) while an approved move's rewrite is queued or running, it's dropped with no SearchIndexRetryQueue entry, even though the reviewer already got a 200. Search stays on the old FQN until a reindex. Before, the rewrite could only be lost during the request itself. Enqueueing the intent before submit (or a shutdown hook that drains/enqueues) would close this. (Code reading; not reproduced.)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks, this was a good catch. All six findings come from the background lane, so I took a different approach in 83cc7a7 and reverted the lane and its ADR. The rewrite is synchronous again, exactly as on main. The 60s turned out to be the engine retrying a rejected scroll: an update-by-query on _all opens a scroll context on every shard of every index even when nothing matches. updateGlossaryTermByFqnPrefix now runs a size-0 search with an _index terms aggregation first. When nothing is tagged it skips the update-by-query entirely (the AUT case: the test term has no tagged assets); otherwise it rewrites only the indices that hold a match.

For this one: nothing is queued in memory any more. The rewrite runs before the reviewer gets the 200, and a failure is enqueued in SearchIndexRetryQueue as before.

if (parentChanged || glossaryChanged || nameChanged) {
invalidateTerm(updated.getId());
updateAssetIndexes(oldFqn, newFqn);
updateAssetIndexes(oldFqn, newFqn, isApprovedChange());

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Cache invalidation for tagged entities can miss while a background rewrite is pending.

invalidateCacheForTaggedEntitiesAndDescendants(oldFqn) (a few lines above) finds tagged assets through search. If this term was just moved by an approval and its rewrite is still queued, search still holds the pre-move FQN, so a rename here finds none of the tagged assets and their cached entities keep old tags until TTL (with Redis or another cache enabled). (Code reading; not reproduced, ITs run cache-off.)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks, this was a good catch. All six findings come from the background lane, so I took a different approach in 83cc7a7 and reverted the lane and its ADR. The rewrite is synchronous again, exactly as on main. The 60s turned out to be the engine retrying a rejected scroll: an update-by-query on _all opens a scroll context on every shard of every index even when nothing matches. updateGlossaryTermByFqnPrefix now runs a size-0 search with an _index terms aggregation first. When nothing is tagged it skips the update-by-query entirely (the AUT case: the test term has no tagged assets); otherwise it rewrites only the indices that hold a match.

For this one: no rewrite is ever pending after a request returns, so invalidateCacheForTaggedEntitiesAndDescendants finds the tagged assets under the FQN the search docs actually hold.

… tagged

Reverts the background lane from 40af058 and its decision record. The
60s wait was the engine retrying a rejected scroll: an update-by-query on
the global alias opens a scroll context on every shard of every index even
when nothing matches. A size-0 search with an _index terms aggregation now
picks the indices holding a tagged document; nothing tagged means no
update-by-query, and otherwise only those indices are rewritten. The
rewrite stays synchronous, so ordering, durability and read-your-write are
as on main.
@anuj-kumary anuj-kumary changed the title Fixes #37466: Rewrite tagged assets in the background when a held glossary term move is approved Fixes #37466: Skip the glossary tagged-asset rewrite on indices that hold no tagged document Nov 11, 2026
A search that missed a shard could drop an index holding tagged documents
from the rewrite with nothing logged. It now throws, so the rename goes to
SearchIndexRetryQueue. A full 1000-bucket page falls back to the whole
alias instead of silently leaving indices out. Adds
ADR:2026-11-11-a-global-alias-rewrite-targets-only-the-indices-holding-a-match.
@gitar-bot

gitar-bot Bot commented Nov 11, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 🔴 High risk 4 closed / 4 findings

Scoping glossary tag rewrites to discovered indices affects search-index integrity; an incomplete search result could leave moved terms stale in asset documents.

Skips the glossary tagged-asset search rewrite when no index holds a matching document, and narrows the update-by-query to only the indices that do, avoiding the scroll-context exhaustion that caused 429 failures on approved glossary term moves. Rewrite remains synchronous in the request, and failed shards route to the retry queue. Previously open findings around ordering, unrecorded ADR rules, and partial shard failures were resolved, and the decision record is now added.

✅ 4 closed
✅ Bug: Unordered background rewrite can be overtaken by the next term rename

📄 openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/GlossaryTermRepository.java:2168-2179 📄 openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/GlossaryTermRepository.java:2738 📄 openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/GlossaryTermRepository.java:2806
With inBackground true, the A→B rewrite is handed to AsyncService.execute, which uses a virtual-thread-per-task executor, so nothing orders it against later rewrites of the same term. Say a reviewer approves a held move A→B, and then the term is renamed again by a plain PATCH, which runs inline, or by a second approval. The B→C update-by-query can then snapshot its prefix-B matches while A→B is still going through a large index. That is the slow case this PR targets. Documents A→B reaches after that snapshot are left tagged B, while the DB says C. Neither query fails, so SearchIndexRetryQueue is never told, and the assets stay stale until a full reindex.

Fix: serialize FQN-prefix rewrites per glossary, for example with a single-threaded executor or a per-root-FQN lock taken by both the inline and background paths. Another option is to make a later inline rewrite wait for any rewrite already in flight for the same term.

✅ Quality: Background-vs-inline asset rewrite rule is not recorded in an ADR

📄 openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/GlossaryTermRepository.java:2165-2175
This PR makes a new decision: when an approved change request moves or renames a term, the tagged-asset search rewrite runs in the background, and a plain PATCH still rewrites inline. The description says "Plain PATCH renames and moves still rewrite tagged assets inline" and the rewrite is "handed to AsyncService after commit when applying an approved change." Neither ADR covers this. ADR:2026-10-30-a-glossary-term-move-is-authorized-and-held-as-the-patch-that-makes-it says only that an approved move "applies it as that PATCH". ADR:2026-11-03-a-failed-background-propagation-is-replayed says "renames and reference rewrites keep their current behaviour". The repository squash-merges, so this rule would live only in a code comment. A record should state: "Applying an approved glossary-term move or rename rewrites tagged assets in search asynchronously after commit; search is eventually consistent for that path, and a failed rewrite is retried via SearchIndexRetryQueue. A direct PATCH rewrites them inline." It should also say whether such rewrites must stay ordered against later renames.

✅ Edge Case: Partial shard failures in the probe search silently skip tagged docs

📄 openmetadata-service/src/main/java/org/openmetadata/service/search/opensearch/OpenSearchEntityManager.java:1234-1248 📄 openmetadata-service/src/main/java/org/openmetadata/service/search/opensearch/OpenSearchEntityManager.java:1262-1268 📄 openmetadata-service/src/main/java/org/openmetadata/service/search/elasticsearch/ElasticSearchEntityManager.java:1170-1184 📄 openmetadata-service/src/main/java/org/openmetadata/service/search/elasticsearch/ElasticSearchEntityManager.java:1199-1205
indicesHoldingMatches reads only the aggregation buckets and never checks response.shards().failed(). A search returns 200 with partial results by default, so on a busy node, which is the scenario #37466 describes, a shard rejected by the search thread pool just drops its index from the buckets. Any index that does hold tagged documents is then left out of the update-by-query, or the method returns early with nothing to rewrite. Nothing gets logged as an error, and no entry goes to SearchIndexRetryQueue. On main, the update-by-query covered every index and reported shard failures through the reconciler. The fix is to throw when the probe reports failed shards (or to set allowPartialSearchResults(false)). The existing catch then enqueues the retry. This applies to both engines.

✅ Quality: Probe-then-narrow rule and its 1000-index cap are not recorded

📄 openmetadata-service/src/main/java/org/openmetadata/service/search/opensearch/OpenSearchEntityManager.java:101-103 📄 openmetadata-service/src/main/java/org/openmetadata/service/search/opensearch/OpenSearchEntityManager.java:1230-1244 📄 openmetadata-service/src/main/java/org/openmetadata/service/search/elasticsearch/ElasticSearchEntityManager.java:98-100 📄 openmetadata-service/src/main/java/org/openmetadata/service/search/elasticsearch/ElasticSearchEntityManager.java:1166-1180
This PR adds a new rule for synchronous update-by-query. Before rewriting through the global alias, it now runs a size-0 _index terms search and limits the update to the indices that hold a match. It also sets a cap, MAX_MATCHING_INDICES = 1000. The description states the rule in prose ("run a size-0 search with the same prefix query and a terms aggregation on _index. A plain search opens no scroll contexts"). The repository squash-merges, so that text never reaches git log. The 1000 cap is a judgment call: any index past it would be skipped silently. 2026-10-09-synchronous-update-by-query-retries-version-conflicts.md covers the conflict retries but not this rule, and the checklist marks it "no durable decision". Sibling helpers such as updateClassificationTagByFqnPrefix still target _all, so a record is needed to say whether they must follow the rule. Suggested record sentence: "An update-by-query over the global alias first finds, with a size-0 _index terms search, the indices holding a match (at most 1000) and targets only those; when none match, it does not run." Add this to a new record or as a revision of the 2026-10-09 record.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@anuj-kumary
anuj-kumary merged commit 7e18ef8 into main Nov 11, 2026
70 checks passed
@anuj-kumary
anuj-kumary deleted the anuj-kumary/uvml1 branch November 11, 2026 06:33
anuj-kumary added a commit that referenced this pull request Nov 11, 2026
…ssary term move is approved (#37467) (#37519)

* 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accepting a held glossary term move blocks the review request on an index-wide search rewrite

2 participants