Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

close tx in vertex/edge query rest api #1038

Merged
merged 2 commits into from
Jun 16, 2020
Merged

close tx in vertex/edge query rest api #1038

merged 2 commits into from
Jun 16, 2020

Conversation

zhoney
Copy link
Contributor

@zhoney zhoney commented Jun 16, 2020

Change-Id: Ic5bccf464dd40a972026663790555eef5e47ceb6

Change-Id: Ic5bccf464dd40a972026663790555eef5e47ceb6
@codecov
Copy link

codecov bot commented Jun 16, 2020

Codecov Report

Merging #1038 into master will increase coverage by 8.70%.
The diff coverage is 85.71%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1038      +/-   ##
============================================
+ Coverage     60.42%   69.13%   +8.70%     
- Complexity     4580     5422     +842     
============================================
  Files           329      329              
  Lines         26370    26372       +2     
  Branches       3757     3757              
============================================
+ Hits          15933    18231    +2298     
+ Misses         8710     6360    -2350     
- Partials       1727     1781      +54     
Impacted Files Coverage Δ Complexity Δ
...gegraph/backend/serializer/BinaryBackendEntry.java 82.27% <ø> (+26.72%) 28.00 <0.00> (+9.00)
...va/com/baidu/hugegraph/job/system/JobCounters.java 78.37% <ø> (ø) 3.00 <0.00> (ø)
...in/java/com/baidu/hugegraph/api/graph/EdgeAPI.java 55.26% <83.33%> (+0.47%) 0.00 <0.00> (ø)
.../java/com/baidu/hugegraph/api/graph/VertexAPI.java 37.26% <83.33%> (+0.78%) 0.00 <0.00> (ø)
...n/java/com/baidu/hugegraph/config/CoreOptions.java 99.01% <100.00%> (ø) 2.00 <0.00> (ø)
...m/baidu/hugegraph/job/system/DeleteExpiredJob.java 53.12% <100.00%> (ø) 4.00 <0.00> (ø)
...m/baidu/hugegraph/backend/tx/GraphTransaction.java 80.11% <0.00%> (+0.22%) 297.00% <0.00%> (+15.00%)
...du/hugegraph/backend/tx/GraphIndexTransaction.java 79.85% <0.00%> (+0.23%) 192.00% <0.00%> (+3.00%)
...n/java/com/baidu/hugegraph/structure/HugeEdge.java 75.12% <0.00%> (+0.51%) 84.00% <0.00%> (+3.00%)
...ava/com/baidu/hugegraph/structure/HugeElement.java 70.52% <0.00%> (+0.52%) 70.00% <0.00%> (+3.00%)
... and 124 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7eef881...3f101f5. Read the comment docs.

Linary
Linary previously approved these changes Jun 16, 2020
@@ -342,7 +345,9 @@ public String get(@Context GraphManager manager,
HugeGraph g = graph(manager, graph);
Iterator<Edge> edges = g.edges(id);
checkExist(edges, HugeType.EDGE, id);
return manager.serializer(g).writeEdge(edges.next());
String result = manager.serializer(g).writeEdge(edges.next());
g.tx().close();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use try-finally

Change-Id: Ibaf9cd54742f374bcdd6a1beb0a3c273d9e11fb6
@javeme javeme merged commit 18c2804 into master Jun 16, 2020
@javeme javeme deleted the close-tx-in-api branch June 16, 2020 07:25
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.

None yet

3 participants