Sheetal Shah created ATLAS-5375:
-----------------------------------
Summary: Fix stale PUT response for /api/atlas/v2/relationship
block/unblock propagation
Key: ATLAS-5375
URL: https://issues.apache.org/jira/browse/ATLAS-5375
Project: Atlas
Issue Type: Improvement
Components: atlas-core
Affects Versions: 3.0.0
Reporter: Sheetal Shah
Assignee: Sheetal Shah
*Summary*
{{PUT /api/atlas/v2/relationship}} returns HTTP 200 with a stale relationship
body. Block/unblock runs in async task
{{CLASSIFICATION_PROPAGATION_RELATIONSHIP_UPDATE}} after the response, so the
PUT body does not match the request. GET after ~15–30s shows the correct state.
{*}Also{*}: PUT without {{propagateTags}} → NPE in
{{DeleteHandlerV1.updateTagPropagations()}} → task fails; block/unblock never
applies.
*Repro (brief)*
# Propagate tag on source table via lineage edge.
# PUT block with {{blockedPropagatedClassifications: [\{tag}]}} → wait →
verify downstream.
# PUT unblock with {{blockedPropagatedClassifications: []}} → PUT body still
shows old blocked list; GET after wait is correct.
*Root cause*
Response built from graph before deferred task runs; task JSON may have null
{{{}propagateTags{}}}.
*Proposed fix*
* Sync edge metadata on PUT ({{{}blocked{}}}, {{{}propagateTags{}}}) before
response.
* Async entity propagation only in background task.
* Fix null {{propagateTags}} NPE.
* Add {{pendingTasks}} on {{AtlasRelationship}} (PUT + GET
{{{}/api/atlas/v2/relationship/guid/{guid}{}}}).
*Acceptance*
* PUT returns correct edge fields immediately + {{pendingTasks}} when queued.
* No NPE without {{{}propagateTags{}}}.
* Entity tags correct after task completes.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)