-
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 override vertex/edge on some backends #820
Conversation
4318b9d
to
891d974
Compare
Codecov Report
@@ Coverage Diff @@
## master #820 +/- ##
============================================
+ Coverage 69.07% 71.17% +2.09%
- Complexity 4276 4366 +90
============================================
Files 286 286
Lines 21085 21084 -1
Branches 2967 2967
============================================
+ Hits 14565 15006 +441
+ Misses 5086 4592 -494
- Partials 1434 1486 +52
Continue to review full report at Codecov.
|
ed99f47
to
e180cd1
Compare
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TextSerializer.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TextSerializer.java
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TextSerializer.java
Outdated
Show resolved
Hide resolved
hugegraph-test/src/main/java/com/baidu/hugegraph/unit/serializer/BinarySerializerTest.java
Show resolved
Hide resolved
e180cd1
to
1ea3ffa
Compare
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/BinarySerializer.java
Show resolved
Hide resolved
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.
also upgrade rocksdb/hbase/memory backend version
hugegraph-rocksdb/src/main/java/com/baidu/hugegraph/backend/store/rocksdb/RocksDBTables.java
Show resolved
Hide resolved
// Parse vertex properties | ||
assert entry.columnsSize() == 1 : entry.columnsSize(); | ||
this.parseVertex(col.value, vertex); | ||
} |
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.
diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/BinaryInlineSerializer.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/BinaryInlineSerializer.java
index b94d0608..b2481aa6 100644
--- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/BinaryInlineSerializer.java
+++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/BinaryInlineSerializer.java
@@ -72,11 +72,13 @@ public class BinaryInlineSerializer extends BinarySerializer {
// Parse all properties and edges of a Vertex
for (BackendColumn col : entry.columns()) {
- if (id.edge()) {
+ // NOTE: the entry id type is vertex even if entry type is edge
+ if (entry.type().isEdge()) {
// Parse vertex edges
this.parseColumn(col, vertex);
} else {
// Parse vertex properties
+ assert entry.type().isVertex();
assert entry.columnsSize() == 1 : entry.columnsSize();
this.parseVertex(col.value, vertex);
}
|
||
// Parse all properties and edges of a Vertex | ||
for (BackendColumn col : entry.columns()) { | ||
this.parseColumn(col, vertex); | ||
if (entry.type().isEdge()) { | ||
// NOTE: the id is vertex type even if query edge |
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 bug was introduced from https://github.com/hugegraph/hugegraph/pull/680/files#diff-e46dfe3b041d128cc0a4657fe901a3b7R75
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.
// NOTE: the entry id type is vertex even if entry type is edge
79d079a
to
0c08d92
Compare
// Parse vertex edges | ||
this.parseColumn(col, vertex); | ||
} else { | ||
// Parse vertex properties |
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.
assert entry.type().isVertex();
|
||
// Parse all properties and edges of a Vertex | ||
for (BackendColumn col : entry.columns()) { | ||
this.parseColumn(col, vertex); | ||
if (entry.type().isEdge()) { | ||
// NOTE: the id is vertex type even if query edge |
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.
// NOTE: the entry id type is vertex even if entry type is edge
hugegraph-rocksdb/src/main/java/com/baidu/hugegraph/backend/store/rocksdb/RocksDBTables.java
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TextSerializer.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TextSerializer.java
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TextSerializer.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/TextSerializer.java
Outdated
Show resolved
Hide resolved
Fix #792 Change-Id: Iad461c6742773bd001a1768f83479e1ab429e272
Change-Id: I7458be4ad22bcbd178ed25ecd6805b6b4c2c0ada
Change-Id: I16dfd36d8eddedd6ca6abf9199cf32723ad7e268
Change-Id: I4c374d557947187f3469d802f8f0d363541fa70a
0c08d92
to
8b5615e
Compare
Fix #792
Change-Id: Iad461c6742773bd001a1768f83479e1ab429e272