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

add config for whether encoding number of primary keys #1323

Merged
merged 4 commits into from
Jan 7, 2021

Conversation

zhoney
Copy link
Contributor

@zhoney zhoney commented Jan 5, 2021

fix apache/incubator-hugegraph-tools#78
Change-Id: I07e113b7f29e0d38e5d362663046c755ea8dc751

Change-Id: I07e113b7f29e0d38e5d362663046c755ea8dc751
@codecov
Copy link

codecov bot commented Jan 5, 2021

Codecov Report

Merging #1323 (6e0ad26) into master (af2590f) will increase coverage by 0.00%.
The diff coverage is 78.94%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1323   +/-   ##
=========================================
  Coverage     62.33%   62.34%           
+ Complexity     5771     5769    -2     
=========================================
  Files           377      377           
  Lines         31535    31546   +11     
  Branches       4418     4421    +3     
=========================================
+ Hits          19658    19667    +9     
- Misses         9880     9881    +1     
- Partials       1997     1998    +1     
Impacted Files Coverage Δ Complexity Δ
...a/com/baidu/hugegraph/auth/HugeGraphAuthProxy.java 4.06% <0.00%> (+0.01%) 0.00 <0.00> (ø)
...e/src/main/java/com/baidu/hugegraph/HugeGraph.java 65.30% <ø> (ø) 9.00 <0.00> (ø)
...aidu/hugegraph/backend/tx/AbstractTransaction.java 72.90% <ø> (-0.35%) 51.00 <0.00> (-2.00)
...du/hugegraph/backend/tx/GraphIndexTransaction.java 81.15% <ø> (-0.19%) 203.00 <0.00> (ø)
...main/java/com/baidu/hugegraph/job/ComputerJob.java 0.00% <ø> (ø) 0.00 <0.00> (ø)
...baidu/hugegraph/job/computer/AbstractComputer.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...aidu/hugegraph/schema/builder/AbstractBuilder.java 89.28% <ø> (-0.37%) 13.00 <0.00> (-1.00)
...om/baidu/hugegraph/task/StandardTaskScheduler.java 77.44% <ø> (-0.23%) 85.00 <0.00> (-2.00)
...in/java/com/baidu/hugegraph/StandardHugeGraph.java 78.98% <50.00%> (-0.39%) 119.00 <1.00> (+1.00) ⬇️
...m/baidu/hugegraph/job/system/DeleteExpiredJob.java 53.12% <50.00%> (ø) 4.00 <0.00> (ø)
... and 18 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 af2590f...6e0ad26. Read the comment docs.

@@ -200,12 +202,14 @@ public void correctVertexLabel(VertexLabel correctLabel) {
IdStrategy.PRIMARY_KEY);

List<Object> propValues = new ArrayList<>(primaryKeys.size());
boolean encodeNumber = ((HugeConfig) this.graph().configuration()).get(
Copy link
Contributor

Choose a reason for hiding this comment

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

don't call configuration() if enable auth

Copy link
Contributor

Choose a reason for hiding this comment

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

add method graph.option(CoreOptions.VERTEX_ENCODE_PK_NUMBER) and set whitelist

@javeme
Copy link
Contributor

javeme commented Jan 6, 2021

please set related issue id

zhoney added 2 commits January 6, 2021 16:59
fixed: hugegraph/hugegraph-tools #78

Change-Id: I6faab73da43c8f2ede349b109b1047c2689f2e57
Change-Id: Iced43f9d1d193bb37c2877c281cd400c3ffd65fc
@@ -547,6 +548,11 @@ public long now() {
return this.hugegraph.now();
}

@Override
public <V> V option(ConfigOption<V> option) {
return this.hugegraph.option(option);
Copy link
Contributor

Choose a reason for hiding this comment

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

this.verifyStatusPermission();

@@ -270,6 +270,11 @@ public boolean existsSchemaId(HugeType type, Id id) {
return this.getSchema(type, id) != null;
}

private boolean syncDelete() {
Copy link
Contributor

Choose a reason for hiding this comment

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

let asyncRun get it by option()

@@ -95,7 +96,7 @@ protected void checkSchemaIdIfRestoringMode(HugeType type, Id id) {
}

protected long taskWaitTimeout() {
return this.transaction.taskWaitTimeout();
return this.graph.option(CoreOptions.TASK_WAIT_TIMEOUT);
Copy link
Contributor

Choose a reason for hiding this comment

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

delete taskWaitTimeout() method

Configuration conf = HugeFeatures.this.graph.configuration();
return ((HugeConfig) conf).get(CoreOptions.VERTEX_DEFAULT_LABEL);
return HugeFeatures.this.graph
.option(CoreOptions.VERTEX_DEFAULT_LABEL);
Copy link
Contributor

Choose a reason for hiding this comment

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

align with ".this"

@@ -200,12 +201,14 @@ public void correctVertexLabel(VertexLabel correctLabel) {
IdStrategy.PRIMARY_KEY);

List<Object> propValues = new ArrayList<>(primaryKeys.size());
boolean encodeNumber = this.graph()
.option(CoreOptions.VERTEX_ENCODE_PK_NUMBER);
Copy link
Contributor

Choose a reason for hiding this comment

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

move to line 203

if (propertyName.equals(P.INPUT)) {
propertyLimit = this.scheduler().taskInputSizeLimit();
propertyLimit = graph.option(CoreOptions.TASK_INPUT_SIZE_LIMIT)
.intValue();
Copy link
Contributor

Choose a reason for hiding this comment

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

change propertyLimit to long

Change-Id: Ie30feaf37fbfd7dbdd6286b0f1adf0ff3fdd3044
@zhoney zhoney merged commit bc90cf9 into master Jan 7, 2021
@zhoney zhoney deleted the config-pk-encode branch January 7, 2021 06:36
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.

[问题 ] 图数据0.9/0.10版本升级0.11失败(点边数据不一致)
3 participants