Skip to content

[2.1] Fixes 36026: Reconcile replayed RDF non-lineage and glossary relations against SQL - #38581

Merged
yan-3005 merged 1 commit into
2.1from
backport/2.1/pr-38482
Nov 24, 2026
Merged

yan-3005 merged 1 commit into
2.1from
backport/2.1/pr-38482

Conversation

@yan-3005

Copy link
Copy Markdown
Contributor

Backport of #38482 to 2.1 (Fixes #36026). The automatic backport failed: #38482 was written on top of #38419 (RDF live writes, table keys, concept bindings, quality evidence), which is not on 2.1. This is a hand port onto 2.1's RDF code, not a backport of #38419.

What it does: before projecting a replayed or delayed RDF relationship add (generic relationships and glossary-term relations), check the SQL row still exists; if it does not, remove the triple instead of resurrecting a deleted edge. The reverse-row lookup applies only to metric → metric RELATED_TO, the only bidirectional addRelationship(..., true) caller.

Adapted for 2.1:

Tests (MySQL + Elasticsearch, 2.1):

  • Rdf*Test unit: 835 run, 0 failures, 0 errors (all 11 new RdfLiveWriteTest cases ran).
  • RdfLiveProjectionIT (rdf lane, Fuseki): 5/5, 0 skipped, including replayedRelationshipAndGlossaryRelationAdditionsDoNotResurrectDeletedEdges and bidirectionalMetricRelatedToProjectsBothDirectionsAndReconcilesOnReplay.
  • With RdfRepository reverted to 2.1: the same IT fails exactly those two cases (the deleted contains and metric relatedTo triples come back after replay).
  • Not run on Postgres; the new SQL is identical to the version merged on main.

🤖 Generated with Claude Code

…lations against SQL (#38482)

Before projecting a replayed RDF relationship add (generic relationships and
glossary-term relations), check the SQL row still exists; if it does not,
remove the triple instead of resurrecting it. The reverse-row lookup applies
only to metric -> metric RELATED_TO.

Adapted for 2.1 (main's #38419 is not on this branch):
- RdfProjectionLoaders: keep 2.1's 6-component record (no BoundAssets or
  table-key loaders); add RelationshipExists and GlossaryTermRelationRows.
- RdfLiveWriteTest, RdfGlossaryTermRelationTest, RdfEntityDeleteLineageTest:
  construct the 6-arg loaders; keep 2.1's existing tests and add #38482's
  cases.
- RdfQualityEvidenceTest: dropped, the file does not exist on 2.1.

(cherry picked from commit 0c6f3b0)
@yan-3005
yan-3005 requested a review from a team as a code owner November 24, 2026 09:58
@yan-3005
yan-3005 requested review from sonika-shah and removed request for a team November 24, 2026 09:58
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@gitar-bot

gitar-bot Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk

Replay now reconciles generic and glossary RDF edges against SQL, so lookup mismatches could omit valid projected relationships or retain stale triples.

Backports the RDF replay fix to 2.1 so that replayed or delayed relationship and glossary-term additions check the SQL row still exists and remove the triple instead of resurrecting a deleted edge. Metric RELATED_TO reverse-row reconciliation is included. No issues found.

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

@yan-3005
yan-3005 merged commit ea719be into 2.1 Nov 24, 2026
44 of 45 checks passed
@yan-3005
yan-3005 deleted the backport/2.1/pr-38482 branch November 24, 2026 13:44
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.

2 participants