Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
eb641d56
Commit
eb641d56
authored
Jun 24, 2020
by
Sarath Subramanian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3863: Avoid re-evaluating tag propagation when deleting relationship (edge)
parent
25ba9b30
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
22 deletions
+3
-22
GraphHelper.java
...n/java/org/apache/atlas/repository/graph/GraphHelper.java
+2
-16
DeleteHandlerV1.java
...ache/atlas/repository/store/graph/v1/DeleteHandlerV1.java
+1
-6
No files found.
repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
View file @
eb641d56
...
...
@@ -407,22 +407,8 @@ public final class GraphHelper {
return
ret
;
}
public
static
List
<
AtlasEdge
>
getIncomingClassificationEdges
(
AtlasVertex
classificationVertex
)
{
List
<
AtlasEdge
>
ret
=
new
ArrayList
<>();
String
classificationName
=
getTypeName
(
classificationVertex
);
Iterable
edges
=
classificationVertex
.
query
().
direction
(
AtlasEdgeDirection
.
IN
).
label
(
CLASSIFICATION_LABEL
)
.
has
(
CLASSIFICATION_EDGE_NAME_PROPERTY_KEY
,
classificationName
).
edges
();
if
(
edges
!=
null
)
{
Iterator
<
AtlasEdge
>
iterator
=
edges
.
iterator
();
while
(
iterator
.
hasNext
())
{
AtlasEdge
edge
=
iterator
.
next
();
ret
.
add
(
edge
);
}
}
return
ret
;
public
static
boolean
hasEntityReferences
(
AtlasVertex
classificationVertex
)
{
return
classificationVertex
.
hasEdges
(
AtlasEdgeDirection
.
IN
,
CLASSIFICATION_LABEL
);
}
public
static
List
<
AtlasVertex
>
getAllPropagatedEntityVertices
(
AtlasVertex
classificationVertex
)
{
...
...
repository/src/main/java/org/apache/atlas/repository/store/graph/v1/DeleteHandlerV1.java
View file @
eb641d56
...
...
@@ -156,9 +156,6 @@ public abstract class DeleteHandlerV1 {
continue
;
}
// re-evaluate tag propagation
removeTagPropagation
(
edge
);
deleteEdge
(
edge
,
isInternal
||
forceDelete
);
}
}
...
...
@@ -974,10 +971,8 @@ public abstract class DeleteHandlerV1 {
LOG
.
debug
(
"Deleting classification vertex"
,
string
(
classificationVertex
));
}
List
<
AtlasEdge
>
incomingClassificationEdges
=
getIncomingClassificationEdges
(
classificationVertex
);
// delete classification vertex only if it has no more entity references (direct or propagated)
if
(
CollectionUtils
.
isEmpty
(
incomingClassificationEdges
))
{
if
(
!
hasEntityReferences
(
classificationVertex
))
{
_deleteVertex
(
classificationVertex
,
force
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment