ATLAS-5381: Handle empty/corrupted reference vertices during entity delete and purge traversal - #740
Open
sheetalshah1007 wants to merge 1 commit into
Open
ATLAS-5381: Handle empty/corrupted reference vertices during entity delete and purge traversal#740sheetalshah1007 wants to merge 1 commit into
sheetalshah1007 wants to merge 1 commit into
Conversation
…elete and purge traversal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes delete and purge failures when owned reference vertices are empty or corrupt — the relationship edge remains, but required properties such as
__typeNameand__guidare missing.Error fixed:
ATLAS-400-00-014: Type ENTITY with name null does not existOn
GET, this graph state already appears asnullin relationship arrays such asrelationshipAttributes.columns(ATLAS-4605). OnDELETE/PURGE, however, the same invalid vertices could cause the entire operation to fail — for example, a table could not be deleted when one or more column references were empty.This PR skips unreadable reference vertices during delete/purge traversal and logs a warning, consistent with read-path handling (
ATLAS-4605) and purge resilience (ATLAS-4766).Changes in DeleteHandlerV1
isUnreadableEntityVertex()andresolveEntityType().getOwnedVertices()accumulateDeletionCandidates()addUpstreamProcessEntities()getColumnLineageEntities()deleteEdgeReference()testDeleteTableWithHollowOwnedColumnVertex()to verify that a table with an empty column vertex can be deleted successfully.Problem
Graph vertices can exist as empty reference vertices: the vertex and relationship edge remain, but the entity properties are missing.
Symptoms
relationshipAttributes.columnsmay containnullentries.ATLAS-400-00-014can be thrown fromDeleteHandlerV1.getOwnedVertices(), blocking deletion or purge expansion.Solution
During delete/purge processing, skip vertices that cannot be read as entities and log a warning.
Valid references and the parent entity continue to be processed. When the parent is deleted, stale edges are removed through the existing
deleteTypeVertex()logic.Expected Outcome
ATLAS-400-00-014nullentries in relationship arrays (e.g.columns)Known Limitations
GETmay continue to shownullin relationship arrays until the affected entity is deleted.Testing
Automated Tests
DeleteHandlerV1Test.testDeleteTableWithHollowOwnedColumnVertexDeleteHandlerV1TestATLAS-4766andATLAS-5317purge/resilience tests pass.Manual Verification
GETentity showsnullincolumns.DELETEby GUID succeeds.ATLAS-400-00-014.