-
Notifications
You must be signed in to change notification settings - Fork 521
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 bug traverseByLabel() not set page every loop #805
Conversation
fixed: #802 Change-Id: I586032e221ebfdc3141fb9374bca23a4d5af229c
Codecov Report
@@ Coverage Diff @@
## master #805 +/- ##
============================================
+ Coverage 71.13% 71.75% +0.62%
- Complexity 4331 4381 +50
============================================
Files 283 283
Lines 20957 20964 +7
Branches 2957 2958 +1
============================================
+ Hits 14908 15043 +135
+ Misses 4568 4443 -125
+ Partials 1481 1478 -3
Continue to review full report at Codecov.
|
@@ -127,6 +127,7 @@ public GraphTransaction(HugeGraph graph, BackendStore store) { | |||
CoreOptions.VERTEX_CHECK_CUSTOMIZED_ID_EXIST); | |||
this.verticesCapacity = conf.get(CoreOptions.VERTEX_TX_CAPACITY); | |||
this.edgesCapacity = conf.get(CoreOptions.EDGE_TX_CAPACITY); | |||
this.traverseBatch = conf.get(CoreOptions.QUERY_TRAVERSE_BATCH); |
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.
prefer to use page_size
Assume.assumeFalse("Support query by label", | ||
storeFeatures().supportsQueryByLabel()); | ||
|
||
initDataWithoutLabelIndex(); |
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 case graph().traversal().E().hasLabel(xx)
Assume.assumeFalse("Support query by label", | ||
storeFeatures().supportsQueryByLabel()); | ||
|
||
initDataWithoutLabelIndex(); |
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 case graph().traversal().V().hasLabel(xx)
Change-Id: Ie88d6ad5633f477c87ae21878f93a0abf5727bc1
@@ -1538,10 +1539,14 @@ public void traverseEdgesByLabel(EdgeLabel label, Consumer<Edge> consumer, | |||
SchemaLabel elemLabel = ((HugeElement) e).schemaLabel(); | |||
if (label.equals(elemLabel)) { | |||
consumer.accept(e); | |||
if (deleting) { | |||
this.commit(); | |||
} |
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.
call commitIf()
} | ||
} | ||
if (query.paging()) { | ||
page = PageInfo.pageState(iter).toString(); | ||
query.page(page); |
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.
this.commit();
@@ -127,6 +127,7 @@ public GraphTransaction(HugeGraph graph, BackendStore store) { | |||
CoreOptions.VERTEX_CHECK_CUSTOMIZED_ID_EXIST); | |||
this.verticesCapacity = conf.get(CoreOptions.VERTEX_TX_CAPACITY); | |||
this.edgesCapacity = conf.get(CoreOptions.EDGE_TX_CAPACITY); | |||
this.traverseBatch = conf.get(CoreOptions.QUERY_PAGE_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.
rename this.traverseBatch to pageSize
Change-Id: I789db8f69f76895155be6db97a11f91ce6675971
Also fixed #814 |
graph().traversal().E().hasLabel("read").toList(); | ||
}, e -> { | ||
Assert.assertTrue( | ||
e.getMessage().startsWith("Don't accept query by label") && |
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.
use assertContains() instead and rebase on apache/incubator-hugegraph-commons#43
}, e -> { | ||
Assert.assertTrue( | ||
e.getMessage().startsWith("Don't accept query by label") && | ||
e.getMessage().endsWith("it disables label index")); |
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.
use assertContains() instead and rebase on apache/incubator-hugegraph-commons#43
fixed: #802 #814
Change-Id: I586032e221ebfdc3141fb9374bca23a4d5af229c