Skip to content

ATLAS-4766: java.lang.IllegalStateException from JanuGraph while purg…#682

Open
sheetalshah1007 wants to merge 1 commit into
apache:masterfrom
sheetalshah1007:ATLAS-4766
Open

ATLAS-4766: java.lang.IllegalStateException from JanuGraph while purg…#682
sheetalshah1007 wants to merge 1 commit into
apache:masterfrom
sheetalshah1007:ATLAS-4766

Conversation

@sheetalshah1007

@sheetalshah1007 sheetalshah1007 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

…ing entities at Atlas

What changes were proposed in this pull request?

Problem: DeleteHandlerV1 throws java.lang.IllegalStateException when purging entities because it tries to access graph vertices/edges that have already been removed in the same transaction during batch operations.

Solution:

  1. isRelationshipEdge() method - Wrapped vertex type retrieval in try-catch to gracefully handle IllegalStateException when vertices are already removed
  2. deleteVertex() method - Added edge.exists() and outVertex.exists() checks to skip edges with removed endpoints; wrapped loop in try-catch for resilience

How was this patch tested?

New test suite DeleteHandlerV1Test.java:

  • testIsRelationshipEdgeWithPurgedEndpoint() - Verifies method handles purged endpoints safely
  • testPurgeManagerAfterSubordinateAlreadyPurged() - Tests sequential purge of related entities
  • testBatchPurgeManagerAndSubordinates() - Tests batch purge of multiple entities in one transaction

All tests confirm no IllegalStateException is thrown during delete/purge operations.

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.

1 participant