Repository navigation
Backport (2.0): Fixes #34689: keep a table's tags and data products off its column search entries - #39340
Conversation
…ff its column search entries A table's tag and data-product changes were copied by update-by-query onto every child index, column_search_index included, racing ColumnSearchIndex. Columns then showed up on a classification's or data product's Assets tab they do not carry. Backports the search part of #35026: PropagationDescriptor.skipping() lets a descriptor skip child indexes, and TableRepository keeps tags and dataProducts off tableColumn. Child aliases are grouped by skipped fields so each group gets its own updateChildren request.
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Column entries no longer take the table's tags by cascade, but a column without its own tier inherits the table's, which lives in tags. Rebuild the entries through ColumnSearchIndex on a tags change so the tier stays current.
Column entries take only the tier from the table's tags, so an ordinary tag change keeps the inherited-field update instead of a delete-and-rebuild of every column entry.
Code Review ✅ Approved 🟡 Medium risk 2 closed / 2 findingsChanging table-field propagation and tier-triggered column reindexing alters search-index contents; routing errors could omit inherited fields or leave stale tags. Stops a table's tags and data products from being copied onto its column search entries during propagation, so column entries carry only their own tags and classification counts no longer include untagged columns. Table tier changes no longer reach column entries, and table tag changes now fully re-index every column entry. No open issues found. ✅ 2 closed✅ Bug: Table tier changes no longer reach column entries
✅ Performance: Any table tag change fully re-indexes every column entry
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 |
Describe your changes:
Backport to
2.0of the search part of #35026 ("keep a table's tags and data products off its column entries"). Fixes #34689 on the 2.0 line.Problem (customer-reported, Payoneer on 2.0.10): a classification's Assets tab counts columns that were never tagged. 559 tagged tables/views showed 1,312 assets because 753 columns were counted too. On 2.0, a table's
tagsanddataProductschanges are copied by update-by-query onto every child index,column_search_indexincluded. That copy races withColumnSearchIndex, which builds a column's entry from the column's own tags only. So the table's tags leak onto some column entries, and those columns match the tag in search.Fix:
PropagationDescriptorgainsskippedChildAliases+skipping(...)/reaches(alias). The 3-arg constructor is kept, so existing callers (and Collate) compile unchanged.TableRepositorymarkstagsanddataProductsas.skipping(TABLE_COLUMN).SearchRepository.propagateInheritedFieldsToChildrengroups the non-time-series child aliases by the fields they skip and sends each group its ownupdateChildrenrequest. Test cases still get the table's tags; columns still get owners/domains/etc.ADR:2026-10-08-column-entries-carry-only-their-own-tags, scoped to 2.0.Not backported: the bulk-edit / Assets-tab PATCH rewrite from #35026, and glossary-term inheritance on column entries (
inheritedTermsOnlyFor). 2.0 has no field-level term inheritance, so on 2.0 column entries carry only their own tags, the same asColumnSearchIndexalready builds them.Existing data: column entries that already carry leaked tags keep them until they are rebuilt. Reindexing
tableColumnclears them.Tests
SearchRepositoryBehaviorTest.propagateInheritedFieldsToChildrenKeepsTableTagsAndDataProductsOffColumnEntries. It uses the realTableRepositorydescriptors and asserts thattestCasegetstagAdded+updatedDataProducts+updatedOwnerswhiletableColumngets onlyupdatedOwners. It fails without theTableRepositorychange (1updateChildrencall instead of 2) and passes with it.SearchRepositoryBehaviorTest: 130/130 pass locally.mvn spotless:checkis clean.Type of change:
Checklist:
Fixes <issue-number>: <short explanation>🤖 Generated with Claude Code