javeme commented on code in PR #2649:
URL:
https://github.com/apache/incubator-hugegraph/pull/2649#discussion_r1818106190
##########
hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/IdGenerator.java:
##########
@@ -196,11 +196,11 @@ public String toString() {
}
}
- public static final class LongId extends Number implements Id {
+ public static class LongId extends Number implements Id {
private static final long serialVersionUID = -7732461469037400190L;
- private final long id;
+ protected Long id;
Review Comment:
can we keep primitive type `long` because a object reference also cause
64bits memory when it's off heap, and cause more memory when it's on heap.
##########
hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinaryBackendEntry.java:
##########
@@ -49,7 +49,8 @@ public BinaryBackendEntry(HugeType type, byte[] bytes,
boolean enablePartition)
}
// FIXME: `enablePartition` is unused here
- public BinaryBackendEntry(HugeType type, byte[] bytes, boolean
enablePartition, boolean isOlap) {
+ public BinaryBackendEntry(HugeType type, byte[] bytes, boolean
enablePartition,
+ boolean isOlap) {
Review Comment:
keep the original code if the logic is not changed?
##########
hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinaryBackendEntry.java:
##########
@@ -207,10 +208,10 @@ public int hashCode() {
return this.id().hashCode() ^ this.columns.size();
}
- public static final class BinaryId implements Id {
+ public static class BinaryId implements Id {
Review Comment:
seems don't need to transform BinaryId, it's just short-term used during
serialization. you cam double check
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]