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
8663eb1d
Commit
8663eb1d
authored
7 years ago
by
Ashutosh Mestry
Committed by
Madhan Neethiraj
7 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2195: fix to close trasaction left open while queries index keys (#2)
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
59f83fc0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
11 deletions
+21
-11
GraphBackedSearchIndexer.java
...ache/atlas/repository/graph/GraphBackedSearchIndexer.java
+21
-11
No files found.
repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java
View file @
8663eb1d
...
...
@@ -261,23 +261,33 @@ public class GraphBackedSearchIndexer implements SearchIndexer, ActiveStateChang
try
{
management
=
provider
.
get
().
getManagementSystem
();
}
catch
(
RepositoryException
excp
)
{
LOG
.
error
(
"failed to get indexedKeys from graph"
,
excp
);
}
if
(
management
!=
null
)
{
AtlasGraphIndex
vertexIndex
=
management
.
getGraphIndex
(
Constants
.
VERTEX_INDEX
);
if
(
management
!=
null
)
{
AtlasGraphIndex
vertexIndex
=
management
.
getGraphIndex
(
Constants
.
VERTEX_INDEX
);
if
(
vertexIndex
!=
null
)
{
recomputeIndexedKeys
=
false
;
if
(
vertexIndex
!=
null
)
{
recomputeIndexedKeys
=
false
;
Set
<
String
>
indexKeys
=
new
HashSet
<>();
Set
<
String
>
indexKeys
=
new
HashSet
<>();
for
(
AtlasPropertyKey
fieldKey
:
vertexIndex
.
getFieldKeys
())
{
indexKeys
.
add
(
fieldKey
.
getName
());
}
for
(
AtlasPropertyKey
fieldKey
:
vertexIndex
.
getFieldKeys
())
{
indexKeys
.
add
(
fieldKey
.
getName
());
vertexIndexKeys
=
indexKeys
;
}
vertexIndexKeys
=
indexKeys
;
management
.
commit
();
}
}
catch
(
Exception
excp
)
{
LOG
.
error
(
"getVertexIndexKeys(): failed to get indexedKeys from graph"
,
excp
);
if
(
management
!=
null
)
{
try
{
management
.
rollback
();
}
catch
(
Exception
e
)
{
LOG
.
error
(
"getVertexIndexKeys(): rollback failed"
,
e
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
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