-
Notifications
You must be signed in to change notification settings - Fork 562
Upgrade/tinkerpop 3.7.2 #2884
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
base: master
Are you sure you want to change the base?
Upgrade/tinkerpop 3.7.2 #2884
Conversation
Upgrade Apache TinkerPop dependency to 3.7.2 to support Java 17 compatibility
while maintaining Java 11 backward compatibility.
Changes:
- Upgrade tinkerpop.version from 3.5.1 to 3.7.2 in hugegraph-server/pom.xml
- Update BiPredicate to PBiPredicate in query condition implementations
(Condition.java, ConditionP.java, TraversalUtil.java)
- Fix package relocations: org.apache.tinkerpop.gremlin.driver.* -> org.apache.tinkerpop.gremlin.util.*
- Update serializer class names: GraphSONMessageSerializerV{1,2,3}d0 -> GraphSONMessageSerializerV{1,2,3}
- Migrate all Gremlin server and driver configuration files
This upgrade addresses the main blocking issue for Java 17 migration.
This commit fixes the remaining issues found after the initial TinkerPop 3.7.2 upgrade:
1. Update CoreVersion.GREMLIN_VERSION constant from "3.5.1" to "3.7.2"
- Fixes version API returning incorrect Gremlin version
- Located in hugegraph-server/hugegraph-core/.../CoreVersion.java
2. Update Docker multi-node deployment configurations (12 files)
- Fix package path: org.apache.tinkerpop.gremlin.driver.ser.* -> org.apache.tinkerpop.gremlin.util.ser.*
- Remove deprecated "d0" suffix: GraphSONMessageSerializerV{1,2,3}d0 -> GraphSONMessageSerializerV{1,2,3}
- Affects docker/configs/server{1,2,3}-conf/*.yaml
- Required for Docker Compose multi-server cluster deployment
These files were missed in the initial upgrade (commit 44a6c3a) but are now
required for complete TinkerPop 3.7.2 compatibility across all deployment scenarios.
Remove gremlin-groovy-test 3.2.11 from test dependencies. This module was officially deprecated in TinkerPop 3.2.4 and removed in 3.3.0 (March 2017). The test functionality has been consolidated into gremlin-test module. Verified that: - No code references to gremlin-groovy-test in the codebase - Project compiles successfully without this dependency - TinkerPop 3.7.2 does not provide gremlin-groovy-test References: - TinkerPop 3.3.0 Upgrade Guide: https://tinkerpop.apache.org/docs/3.3.0/upgrade/ - JIRA TINKERPOP-1612: https://issues.apache.org/jira/browse/TINKERPOP-1612
[INFO]
[INFO] Results:
[INFO]
[WARNING] Tests run: 736, Failures: 0, Errors: 0, Skipped: 86
[INFO]
[INFO]
[INFO] --- jacoco:0.8.8:report-aggregate (post-test) @ hugegraph-test ---
[INFO] Loading execution data file /home/developer/ospp/incubator-hugegraph/hugegraph-server/hugegraph-test/target/jacoco.exec
[INFO] Analyzed bundle 'hugegraph-core' with 679 classes
[INFO] Analyzed bundle 'hugegraph-api' with 198 classes
[INFO] Analyzed bundle 'hugegraph-cassandra' with 43 classes
[INFO] Analyzed bundle 'hugegraph-scylladb' with 13 classes
[INFO] Analyzed bundle 'hugegraph-rocksdb' with 55 classes
[INFO] Analyzed bundle 'hugegraph-hbase' with 33 classes
[INFO] Analyzed bundle 'hugegraph-mysql' with 39 classes
[INFO] Analyzed bundle 'hugegraph-postgresql' with 28 classes
[INFO] Analyzed bundle 'hugegraph-dist' with 9 classes
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for hugegraph 1.5.0:
[INFO]
[INFO] hugegraph .......................................... SUCCESS
[INFO] hugegraph-commons .................................. SUCCESS
[INFO] hugegraph-common ................................... SUCCESS
[INFO] hugegraph-pd ....................................... SUCCESS
[INFO] hg-pd-grpc ......................................... SUCCESS
[INFO] hg-pd-common ....................................... SUCCESS
[INFO] hg-pd-client ....................................... SUCCESS
[INFO] hugegraph-store .................................... SUCCESS
[INFO] hg-store-common .................................... SUCCESS
[INFO] hugegraph-server ................................... SUCCESS
[INFO] hugegraph-core ..................................... SUCCESS
[INFO] hugegraph-rpc ...................................... SUCCESS
[INFO] hugegraph-api ...................................... SUCCESS
[INFO] hugegraph-cassandra ................................ SUCCESS
[INFO] hugegraph-scylladb ................................. SUCCESS
[INFO] hugegraph-rocksdb .................................. SUCCESS
[INFO] hugegraph-mysql .................................... SUCCESS
[INFO] hugegraph-palo ..................................... SUCCESS
[INFO] hugegraph-hbase .................................... SUCCESS
[INFO] hugegraph-postgresql ............................... SUCCESS
[INFO] hg-store-grpc ...................................... SUCCESS
[INFO] hg-store-client .................................... SUCCESS
[INFO] hugegraph-hstore ................................... SUCCESS
[INFO] hugegraph-dist ..................................... SUCCESS
[INFO] hugegraph-test ..................................... SUCCESS [03:43 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------pass |
|
Groovy upgraded from 2.5.14 to 4.0.9 |
|
Compilation performance (8c16t 32g):
|
Add --add-opens JVM argument to allow reflection access to java.base/java.util for CollectionFactoryTest. This follows Apache TinkerPop's approach for handling deep reflection in tests when running on Java 17+. Issue: CollectionFactoryTest uses Whitebox.getInternalState() to verify internal capacity of JDK collection classes (ArrayList, HashMap), which requires opening the java.util module in Java 17 due to strong encapsulation. Solution: Add argLine with --add-opens java.base/java.util=ALL-UNNAMED to the unit-test execution in surefire plugin configuration. Verified: - Java 17: 398 tests passed, 0 failed - Java 11: backward compatible (parameter ignored) Reference: https://github.com/apache/tinkerpop/blob/384e9a730c735cd386812d463c6f6922da847988/pom.xml#L214
|
Upgraded the Java version, may require documentation changes |
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.
Pull Request Overview
This PR upgrades Apache TinkerPop from version 3.5.1 to 3.7.2 to enable Java 17 compatibility while maintaining Java 11 backward compatibility. The upgrade involves updating dependencies, migrating APIs due to breaking changes, and updating configuration files.
Key changes include:
- Dependency version bump from 3.5.1 to 3.7.2 in Maven configuration
- API migration from
BiPredicatetoPBiPredicateinterfaces and package relocations for driver components - Configuration updates for Gremlin server serializers with new class names and package paths
- Addition of Java 17+ compatibility JVM arguments for testing
Reviewed Changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| hugegraph-server/pom.xml | Updates TinkerPop version property from 3.5.1 to 3.7.2 |
| hugegraph-server/hugegraph-test/pom.xml | Removes unused gremlin-groovy-test dependency and adds Java 17+ JVM args |
| hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/version/CoreVersion.java | Updates internal GREMLIN_VERSION constant to match dependency version |
| hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Condition.java | Migrates from BiPredicate to PBiPredicate interface |
| hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/*.java | Updates predicate interfaces and imports for TinkerPop 3.7 compatibility |
| hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/cypher/CypherClient.java | Updates imports for relocated driver message classes |
| hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/opencypher/CypherOpProcessor.java | Updates imports for relocated driver message and token classes |
| Multiple YAML config files | Updates serializer class names and packages for TinkerPop 3.7 compatibility |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Purpose of the PR
This PR upgrades Apache TinkerPop from 3.5.1 to 3.7.2 to enable Java 17 compatibility while maintaining Java 11 backward compatibility. TinkerPop 3.7.x is the first series that officially supports Java 17.
Main Changes
tinkerpop.versionfrom3.5.1to3.7.2inhugegraph-server/pom.xml.GREMLIN_VERSION = "3.7.2"inhugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/version/CoreVersion.java.BiPredicatetoPBiPredicate:hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Condition.javahugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/ConditionP.javahugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/TraversalUtil.javadriver.*→util.*):Tokens,RequestMessage,ResponseMessage,ResponseStatusCodehugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/cypher/CypherClient.javahugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/opencypher/CypherOpProcessor.javad0suffix) and package migrated toorg.apache.tinkerpop.gremlin.util.ser.*:hugegraph-server/hugegraph-dist/src/assembly/static/conf/gremlin-server.yamlhugegraph-server/hugegraph-dist/src/assembly/static/conf/gremlin-driver-settings.yamlhugegraph-server/hugegraph-dist/src/assembly/static/conf/remote.yamlhugegraph-server/hugegraph-dist/src/assembly/static/conf/remote-objects.yamlhugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft1/gremlin-server.yamlhugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft2/gremlin-server.yamlhugegraph-server/hugegraph-dist/src/assembly/travis/conf-raft3/gremlin-server.yamldocker/configs/server1-conf/*docker/configs/server2-conf/*docker/configs/server3-conf/*org.apache.tinkerpop:gremlin-groovy-test:3.2.11fromhugegraph-server/hugegraph-test/pom.xmlto avoid version drift and reduce potential conflicts.Verifying these changes
Does this PR potentially affect the following parts?
install-dist/scripts/dependency/regenerate_known_dependencies.shDocumentation Status