Repository navigation
Fixes #36671: Live RDF entity writes send only the changed triples (backport 2.0 #37069) - #37177
Conversation
…ackport 2.0 #37069) Backport of #37069, adapted to 2.0: - 2.0 has no InferenceInvalidatingRdfStorage or AssertedGraphTrackingRdfStorage (main-only, from #28042 and #35201), so their changes and tests are left out. - 2.0 does not project table columns as resources, so RdfPropertyMapper keeps only the named list cells, and the two tests that relied on column triples use extension properties or the 2.0 counts instead. - The new tests use 2.0's JsonLdTranslator constructor and JenaFusekiStorage.isTimeoutError, now package-private for the circuit-breaker test. - The ADR and the production setup guide drop the inference statements that do not apply. (cherry picked from commit d811bd7)
…ustom properties 2.0 has no FusekiTestImage and does not project a table's columns, so the wide-table test changes a table tag on a table with 200 custom properties.
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
2.0 does not project a table's columns, so the disk-growth harness builds tables with 300 custom properties and changes one per write instead of moving a column tag. The decision record gains the 2.0 measurement.
Code Review ✅ Approved🔴 High risk · Switching live RDF writes to difference updates with read-back repair could leave stored entity projections inconsistent if an interference case is missed. Backports the live RDF entity write fix to 2.0 so writes send only the changed triples (or nothing when unchanged), with a read-back replacement when a queued write interferes. 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 |
Describe your changes:
Fixes #36671
Backport of #37069 to the 2.0 release branch. #37069 explains the problem and the design: live entity writes read what Fuseki holds for the entity and send one
DELETE DATA/INSERT DATArequest with only the difference, or nothing; after sending a difference they read the projection back and replace it whole if a write queued ahead of it interfered. It builds on the storage maintenance work 2.0 already has (#36660, #36661).Adapted to 2.0
InferenceInvalidatingRdfStorageandAssertedGraphTrackingRdfStorageexist only onmain(from feat(rdf): SPARQL playground, MCP knowledge-graph tools, insights endpoints #28042 and Fixes 35200: Reject negated EXISTS rules and keep inferred triples out of inferenceLevel=none #35201), so their changes and tests are left out. 2.0 has no live inference invalidation to skip for unchanged writes.maindoes), soRdfPropertyMappertakes only the named list cells. The column part of the entity scope matches nothing on 2.0, which is harmless. Two unit tests and one IT that relied on column triples use custom properties or the 2.0 counts instead.JsonLdTranslator(mapper, baseUri)constructor andJenaFusekiStorage.isTimeoutError, now package-private forEntityWriteCircuitBreakerTest.FusekiTestImage, the IT helperRdfEntityDiffWriteITstarts its Fuseki with, comes over frommainunchanged.2.0 ships Fuseki 6.2.0, so the read-back's reliance on TDB2's arrival-order writer admission holds here too.
Type of change:
High-level design:
Same as #37069; see its description and
docs/decisions/2026-11-03-live-rdf-entity-writes-send-only-the-changed-triples.md. Bulk reindex, relationship writes and the rebuild journal are unchanged; journal replay passesREPLACEexplicitly.Tests:
Use cases covered
Those of #37069, except the inference and asserted-graph cases that have no counterpart on 2.0.
Unit tests
RdfEntityWritePlannerTest,RdfOwnedResourcesTest,EntityWriteCircuitBreakerTest,RdfMutationReplayTest.f5333c1fedd: every test underorg.openmetadata.service.rdf, plusSearchIndexHandlerTest,DataContractFieldSupportTest,EntityRepository*Test,McpServerResourceTest,McpServiceResourceTest,SearchRepositoryBehaviorTest: 747 run, 0 failed.Backend integration tests
RdfEntityDiffWriteIT(its own Fuseki container): 5/5 pass.mvn verify -pl :openmetadata-integration-tests -Pmysql-elasticsearch -DintegrationTests.lane=parallel -DenableRdf=true -Dit.test='Rdf*IT,GlossaryRdfImportIT'(2.0's CI does not run the RDF ITs): 181 run, 10 failed, 2 skipped.RdfEntityDiffWriteIT's column-tag test, adapted inf5333c1fedd(above).2.0(fb2dd3787fb, this branch's base) with the same command:RdfResourceIT(4),RdfRelationExclusionsIT(2),RdfGraphExploreIT(1),RdfTagsTierCertificationIT(2). They are pre-existing on 2.0, not caused by this backport.RdfBlueGreenRebuildIT(26),RdfLiveWriteRecoveryIT(22),RdfStorageMaintenanceIT(14),RdfReindexFailuresIT(13),RdfStorageReadinessIT,RdfMaintenanceRecoveryIT,RdfGlossaryGraphIT,RdfFusekiAuthorizationIT,RdfLiveProjectionIT.postgres-rdf-testsprofile pinssecoresearch/fuseki:5.5.0, which rejects updates with 405, so it was not used.Ingestion integration tests
Playwright (UI) tests
Manual testing performed
Disk-growth benchmark, measured on 2.0 (separate from #37069's
mainnumbers, which used 300-column tables 2.0 does not project).f5333c1fedd(unchanged in1f2fd8d6e48, which only adapts the harness, the script and the decision record).openmetadata/fuseki:6.2.0-c75b095(sha256:a763a77a393a63e13609fb1185d28edfc2b334319a38dd0b3db5332c6f9ed42b), one throwaway container on port 3032 with two datasets: REPLACE intoopenmetadata_a, DIFFERENCE intoopenmetadata. Removed afterwards.scripts/rdf-live-update-benchmark.shwithPROPERTIES=300: 200 tables of 300 custom properties each, 5 rounds, so 1,000 writes per scenario. The dataset is compacted before each scenario, and disk is the dataset directory's growth (du -sk).replaced; DIFFERENCE 1,000unchangedand 2,000changed_triples, nonecorrected.51542fd3…fb10f6for both).UI screen recording:
Not applicable — backend-only change with no UI.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.origin/2.0; no 🔴.docs/decisions/2026-11-03-live-rdf-entity-writes-send-only-the-changed-triples.md, with a 2.0 note.🤖 Generated with Claude Code