-
Notifications
You must be signed in to change notification settings - Fork 504
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
Fix rocksdb oom with g.V().hasLabel().count() #823
Conversation
Codecov Report
@@ Coverage Diff @@
## master #823 +/- ##
============================================
+ Coverage 72.13% 72.23% +0.09%
- Complexity 4456 4486 +30
============================================
Files 287 287
Lines 21227 21407 +180
Branches 2992 3017 +25
============================================
+ Hits 15313 15463 +150
- Misses 4401 4433 +32
+ Partials 1513 1511 -2
Continue to review full report at Codecov.
|
TODO: let tx.queryXX() return CIter |
TODO: add gremlin job test with |
@@ -76,6 +76,9 @@ protected final boolean fetch() { | |||
} else if (merged == this.current) { | |||
// The next entry belongs to the current entry | |||
assert this.current != null; | |||
if (this.sizeOf(this.current) >= INLINE_BATCH_SIZE) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as cassandra and hbase
|
||
/** | ||
* For paging situation | ||
* @param query original query |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'original query' align
Change-Id: Iae0716e4624e8389b9c3bb74c8f784c54d29d0ba
Change-Id: I3f8da8b39d64dfc8a3aa9e888c6c07feace0878f
Change-Id: I4a14339548b3906f6be024293a8c3bb0e76d65e7
Change-Id: I98047052ceb791eba5e3d915cc2bfeacc2186a01
Change-Id: I75cd3d4bb66bfbbc584033b8f279c6781bf125cc
Change-Id: I625ff7d826f3f3f85ebeff72a94d70e416aee242
Change-Id: I7f4c03d17ad584b97142a07fa10d04868f5be53a
Change-Id: Ib030a2758e73b4c9a9fccf1e310875d58610e4de
Change-Id: I0d178d44ab3b28f1add736eac00fecca06fb8e47
Change-Id: I6851863901143b6b607a7ad8ebc611c1807a17ae
Change-Id: I3a96ade9563a56b8cdd840aaccb7664922ac6950
Change-Id: If8561419d87642986a2f942c1998d78070617163
Change-Id: Id1dd6973d0209598c710069128690e1f58e21011
Change-Id: I0e5a590aafe34f53489901b9c595964c26cde977
Change-Id: If196b2450addbe62cf92fa433b661e1bc28c16cc
Change-Id: Ia578154ef5c58dd3fb3a11d779180a68df9f28fe
Change-Id: Id309f7101e81a643017de3e94c01eceddf52fa8d
Change-Id: I118d49b45467eaefea4b0017b84bbc158692f17b
c8d519e
to
dc5f365
Compare
Change-Id: I4c772747c06890257743283ff5559ac84efbe8d9
dc5f365
to
a48603e
Compare
Change-Id: I632b9f847c55249c96d6aabfa6e037d317124fcb
Change-Id: I773df0769bb25e139e3242b5c8436fc5fd1eec8d
@Test | ||
public void testToStringOfIdRangeQuery() { | ||
IdRangeQuery query = new IdRangeQuery(HugeType.EDGE, | ||
IdGenerator.of(1), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
align
@@ -1211,6 +1275,10 @@ private static boolean hasNullableProp(HugeElement element, Id key) { | |||
return indexLabels; | |||
} | |||
|
|||
private static void increaseLimit(Query query) { | |||
query.limit(query.limit() * 2L + 8L); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the basis?
return null; | ||
} | ||
|
||
public Query asQuery() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
asJointQuery maybe clearer
Change-Id: Ib41ae85b65f95707386e3c5df5ed4286580009c1
vertices.add(vertex); | ||
// Generally there are not too much data with id query | ||
ListIterator<HugeVertex> listIterator = QueryResults.toList(rs); | ||
for (HugeVertex vertex :listIterator.list()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add empty after ":"
if (dir == Directions.OUT && vertex.equals(edge.outVertex()) || | ||
dir == Directions.IN && vertex.equals(edge.inVertex())) { | ||
list.add(edge); | ||
dir == Directions.IN && vertex.equals(edge.inVertex())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete empty
@@ -48,6 +51,7 @@ | |||
private HugeType resultType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
capacityContext
if (this.exhausted) { | ||
return false; | ||
} | ||
boolean hasNext= this.entries.hasNext(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add empty
public PageIds fetchNext(String page, long batchSize) { | ||
E.checkArgument(page == null, | ||
"Not support page parameter by BatchIdHolder"); | ||
E.checkArgument(batchSize >= 0L, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
batchSize might be 0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it's 0 when hit the last page, and then set exhausted true
T result = iterator.next(); | ||
if (iterator.hasNext()) { | ||
throw new HugeException( | ||
"Expect just one result but got two: [%s, %s]", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expect just one result but got at least two: [%s, %s, ...]
Change-Id: I13daaa513b2f5ddc69bcae4d548f263ad1f5b08d
1a406a6
to
0808022
Compare
fix #793
rebase for #798