contrueCT opened a new pull request, #3388: URL: https://github.com/apache/hugegraph/pull/3388
## Purpose of the PR Add opt-in in-process execution for REST `/gremlin` to remove its internal HTTP forwarding hop. `gremlinserver.rest_execution_mode` defaults to `forward`; `embedded` uses this Server's existing Gremlin runtime. Builds on the merged Java 17 (#3261) and TinkerPop 3.8.1 (#3263) upgrades. [Design and investigation](https://hugegraph.feishu.cn/wiki/Y0siwzpYjiWJbzklWhScbshrnMd). ## Main Changes ```text forward: REST -> GremlinClient -> HTTP -> GremlinExecutor embedded: REST ------------------------> GremlinExecutor materialize / commit / serialize ``` - Reuse the live graph manager, workers and JSON serializer, with authentication context and transaction callbacks on the worker. - Preserve request/error handling, blocking admission and REST/evaluation timeout behavior; validate supported local topology and wire startup/shutdown. - Add differential contract tests and reproducible HTTP/RocksDB comparison scripts. Readiness, new overload controls, authentication-cache consistency and global shutdown redesign remain separate tasks. ## Verifying these changes - [ ] Trivial rework / code cleanup without any test coverage. (No Need) - [ ] Already covered by existing tests. - [x] Need tests and can be verified as follows: - Java 17: formatting, full clean compile and Apache RAT checks passed. - 47 focused tests passed, covering REST/Gremlin contracts, authentication context, Memory/RocksDB transactions and bootstrap. - Standalone RocksDB: 76 measurement groups / 316,981 responses validated, including commit/rollback/restart checks; 80,200 successful writes reconciled with stored counts. **Draft follow-up:** at concurrency 32 with 1,000-result responses, the extended comparison's p95 medians were 77.94 -> 68.50 ms, while p99 medians were 90.71 -> 109.59 ms (forward -> embedded). Investigate the tail behavior at matched offered load; these were closed-loop runs on a shared host. HStore, full TinkerPop suites and real authentication-store integration remain unverified. ## Does this PR potentially affect the following parts? - [ ] Dependencies - [x] Modify configurations - [x] The public API - [x] Other affects (Server startup/shutdown integration) - [ ] Nope ## Documentation Status - [ ] `Doc - TODO`: required documentation is pending; complete it before merging. - [x] `Doc - Done`: documentation is included here or linked below. - [ ] `Doc - No Need`: no user-visible documentation is affected. Documentation: [REST Gremlin execution modes](https://github.com/hugegraph/hugegraph/blob/d1239ef88d2d9b4b9b23fb920bcf7f6a387053d7/docs/gremlin-rest-execution.md), linked from the Server README and shipped configuration. -- 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]
