Copilot commented on code in PR #2998:
URL: https://github.com/apache/hugegraph/pull/2998#discussion_r3105805489
##########
.serena/memories/key_file_locations.md:
##########
@@ -1,87 +1,44 @@
# Key File and Directory Locations
-## Project Root
-The project root contains the multi-module Maven structure.
-
-## Configuration Files
-
-### Build Configuration
-- `pom.xml` - Root Maven POM (multi-module)
-- `.editorconfig` - Code style rules
-- `style/checkstyle.xml` - Checkstyle rules
-- `.licenserc.yaml` - License checker config
-
-### Documentation
-- `README.md` - Project overview
-- `BUILDING.md` - Build instructions
-- `CONTRIBUTING.md` - Contribution guide
-- `AGENTS.md` - AI agent development guide
-- `LICENSE` - Apache License 2.0
-- `NOTICE` - Copyright notices
-
-## Server Module (hugegraph-server)
-
-### Core Implementation
-- `hugegraph-core/src/main/java/org/apache/hugegraph/` - Core engine
- - `backend/` - Backend interface
- - `schema/` - Schema management
- - `traversal/` - Query processing
- - `task/` - Background tasks
-
-### API Layer
-- `hugegraph-api/src/main/java/org/apache/hugegraph/api/` - REST APIs
- - `graph/` - GraphAPI
- - `schema/` - SchemaAPI
- - `gremlin/` - GremlinAPI
- - `cypher/` - CypherAPI
- - `auth/` - AuthAPI
- - `opencypher/` - OpenCypher implementation
-
-### Backend Implementations
-- `hugegraph-rocksdb/` - RocksDB backend (default)
-- `hugegraph-hstore/` - HStore distributed backend
-- `hugegraph-hbase/` - HBase backend
-- `hugegraph-mysql/` - MySQL backend
-- `hugegraph-postgresql/` - PostgreSQL backend
-- `hugegraph-cassandra/` - Cassandra backend
-- `hugegraph-scylladb/` - ScyllaDB backend
-- `hugegraph-palo/` - Palo backend
-
-### Distribution and Scripts
-- `hugegraph-dist/src/assembly/static/` - Distribution files
- - `bin/` - Shell scripts (init-store.sh, start-hugegraph.sh,
stop-hugegraph.sh, etc.)
- - `conf/` - Configuration files (hugegraph.properties,
rest-server.properties, gremlin-server.yaml, log4j2.xml)
- - `lib/` - JAR dependencies
- - `logs/` - Log files
-
-### Testing
-- `hugegraph-test/src/main/java/org/apache/hugegraph/` - Test suites
- - `unit/` - Unit tests
- - `core/` - Core functionality tests
- - `api/` - API integration tests
- - `tinkerpop/` - TinkerPop compliance tests
-
-## PD Module (hugegraph-pd)
-- `hg-pd-core/` - Core PD logic
-- `hg-pd-service/` - Service implementation
-- `hg-pd-client/` - Client library
-- `hg-pd-grpc/src/main/proto/` - Protocol definitions
-- `hg-pd-dist/src/assembly/static/` - Distribution files
-
-## Store Module (hugegraph-store)
-- `hg-store-core/` - Core storage logic
-- `hg-store-node/` - Storage node
-- `hg-store-client/` - Client library
-- `hg-store-grpc/src/main/proto/` - Protocol definitions
-- `hg-store-dist/src/assembly/static/` - Distribution files
-
-## Commons Module (hugegraph-commons)
-- Shared utilities, RPC framework
-
-## Struct Module (hugegraph-struct)
-- Data structure definitions (must be built before PD and Store)
-
-## Distribution Module (install-dist)
-- `release-docs/` - LICENSE, NOTICE, licenses/
-- `scripts/dependency/` - Dependency management scripts
-- `target/` - Build output (hugegraph-<version>.tar.gz)
+## Build & Config
+- `pom.xml` — Root multi-module POM
+- `.editorconfig` — Code style rules
+- `style/checkstyle.xml` — Checkstyle enforcement (hugegraph-style.xml was
removed)
+- `.licenserc.yaml` — License checker config
+
+## Server (hugegraph-server)
+- Core engine: `hugegraph-core/src/main/java/org/apache/hugegraph/` →
`backend/`, `schema/`, `traversal/`, `task/`
+- GraphSpace: `hugegraph-core/.../space/` → `GraphSpace.java`,
`SchemaTemplate.java`, `Service.java`, `register/`
+- REST APIs: `hugegraph-api/src/main/java/org/apache/hugegraph/api/` →
`graph/`, `schema/`, `gremlin/`, `cypher/`, `auth/`, `space/` (GraphSpaceAPI),
`metrics/`, `arthas/`
+- OpenCypher: `hugegraph-api/.../opencypher/`
+- Backend interface: `hugegraph-core/.../backend/store/BackendStore.java`
+- Distribution: `hugegraph-dist/src/assembly/static/` → `bin/`, `conf/`,
`lib/`, `logs/`
+- Tests: `hugegraph-test/src/main/java/.../` → `unit/`, `core/`, `api/`,
`tinkerpop/`
+
+## Docker
+- `docker/docker-compose.yml` — Single-node (bridge network, pd+store+server)
+- `docker/docker-compose-3pd-3store-3server.yml` — 3-node cluster
+- `docker/docker-compose.dev.yml` — Dev mode
+
+## PD Module
+- Proto: `hugegraph-pd/hg-pd-grpc/src/main/proto/`
+- Dist: `hugegraph-pd/hg-pd-dist/src/assembly/static/`
+
+## Store Module
+- Proto: `hugegraph-store/hg-store-grpc/src/main/proto/`
+- Dist: `hugegraph-store/hg-store-dist/src/assembly/static/`
+
+## CI Workflows (.github/workflows/)
+- `server-ci.yml` — Server tests (matrix: memory/rocksdb/hbase × Java 11)
+- `pd-store-ci.yml` — PD & Store tests
Review Comment:
`pd-store-ci.yml` currently covers PD, Store, and HStore (workflow name:
“HugeGraph-PD & Store & Hstore CI”). Consider updating this description to
mention HStore as well so it matches the workflow’s scope.
```suggestion
- `pd-store-ci.yml` — PD, Store & HStore tests
```
##########
.serena/memories/task_completion_checklist.md:
##########
@@ -1,139 +1,31 @@
# Task Completion Checklist
-When completing a coding task, follow these steps to ensure quality and
compliance:
-
-## 1. Code Quality Checks (MANDATORY)
-
-### License Header Check
-Run Apache RAT to verify all files have proper license headers:
-```bash
-mvn apache-rat:check -ntp
-```
-Fix any violations by adding the Apache license header.
-
-### Code Style Check
-Run EditorConfig validation:
-```bash
-mvn editorconfig:check
-```
-Fix violations according to `.editorconfig` rules.
-
-### Compilation Check
-Compile with warnings enabled:
-```bash
-mvn clean compile -Dmaven.javadoc.skip=true
-```
-Resolve all compiler warnings, especially unchecked operations.
-
-## 2. Testing (REQUIRED)
-
-### Determine Test Scope
-Check project README or ask user for test commands. Common patterns:
-
-#### Server Module Tests
-- Unit tests:
-```bash
-mvn test -pl hugegraph-server/hugegraph-test -am -P unit-test,memory
-```
-- Core tests (choose backend):
-```bash
-mvn test -pl hugegraph-server/hugegraph-test -am -P core-test,memory
-mvn test -pl hugegraph-server/hugegraph-test -am -P core-test,rocksdb
-```
-- API tests:
-```bash
-mvn test -pl hugegraph-server/hugegraph-test -am -P api-test,rocksdb
-```
-
-#### PD Module Tests
-```bash
-# Build struct dependency first
-mvn install -pl hugegraph-struct -am -DskipTests
-# Run PD tests
-mvn test -pl hugegraph-pd/hg-pd-test -am
-```
-
-#### Store Module Tests
-```bash
-# Build struct dependency first
-mvn install -pl hugegraph-struct -am -DskipTests
-# Run Store tests
-mvn test -pl hugegraph-store/hg-store-test -am
-```
-
-### Run Appropriate Tests
-Execute tests relevant to your changes:
-- For bug fixes: run existing tests to verify fix
-- For new features: write and run new tests
-- For refactoring: run all affected module tests
-
-## 3. Dependencies Management
-
-If adding new third-party dependencies:
-
-1. Add license file to `install-dist/release-docs/licenses/`
-2. Declare dependency in `install-dist/release-docs/LICENSE`
-3. Append NOTICE (if exists) to `install-dist/release-docs/NOTICE`
-4. Update dependency list:
-```bash
-./install-dist/scripts/dependency/regenerate_known_dependencies.sh
-```
-Or manually update `install-dist/scripts/dependency/known-dependencies.txt`
-
-## 4. Build Verification
-
-Build the affected module(s) with tests:
-```bash
-mvn clean install -pl <module> -am
-```
-
-## 5. Documentation (if applicable)
-
-- Update JavaDoc for public APIs
-- Update README if adding user-facing features
-- Update AGENTS.md if adding dev-facing information
-
-## 6. Commit Preparation
-
-### NEVER Commit Unless Explicitly Asked
-- Do NOT auto-commit changes
-- Only commit when user explicitly requests it
-- This is CRITICAL to avoid surprising users
-
-### When Asked to Commit
-- Write clear commit messages:
-```
-Fix bug: <brief description>
-
-fix #ISSUE_ID
-```
+## 1. Code Quality (MANDATORY)
+```bash
+mvn apache-rat:check -ntp # License headers
+mvn editorconfig:check # Style (uses .editorconfig +
style/checkstyle.xml)
Review Comment:
`mvn editorconfig:check` only runs the EditorConfig linter; it doesn’t use
`style/checkstyle.xml` (that’s enforced via the maven-checkstyle-plugin / `mvn
checkstyle:check` or `mvn validate`). Update this comment (or add a separate
Checkstyle command) to avoid misleading readers.
```suggestion
mvn editorconfig:check # Style (.editorconfig)
mvn checkstyle:check # Style (style/checkstyle.xml)
```
##########
.serena/memories/project_overview.md:
##########
@@ -1,35 +1,27 @@
# Apache HugeGraph Project Overview
## Project Purpose
-Apache HugeGraph is a fast-speed and highly-scalable graph database that
supports billions of vertices and edges (10+ billion scale). It is designed for
OLTP workloads with excellent performance and scalability.
+Apache HugeGraph is a fast-speed, highly-scalable graph database supporting
10+ billion vertices/edges for OLTP workloads. Graduated from Apache Incubator
(incubating branding removed).
## Key Capabilities
-- Graph database compliant with Apache TinkerPop 3 framework
-- Supports both Gremlin and Cypher query languages
-- Schema metadata management (VertexLabel, EdgeLabel, PropertyKey, IndexLabel)
+- Apache TinkerPop 3 compliant graph database
+- Gremlin + OpenCypher query languages
+- Schema metadata management (VertexLabel, EdgeLabel, PropertyKey, IndexLabel)
with TTL update support
- Multi-type indexes (exact, range, complex conditions)
-- Pluggable backend storage architecture
-- Integration with big data platforms (Flink/Spark/HDFS)
-- Complete graph ecosystem (computing, visualization, AI/ML)
+- Pluggable backend storage (RocksDB default, HStore distributed)
+- GraphSpace multi-tenancy (standalone mode disables GraphSpaceAPI/ManagerAPI)
+- Swagger UI for REST API documentation
+- Integration with Flink/Spark/HDFS
## Technology Stack
- **Language**: Java 11+ (required)
-- **Build Tool**: Apache Maven 3.5+ (required)
+- **Build**: Maven 3.5+
- **Graph Framework**: Apache TinkerPop 3.5.1
-- **RPC**: gRPC with Protocol Buffers
-- **Storage Backends**:
- - RocksDB (default, embedded)
- - HStore (distributed, production)
- - Legacy (≤1.5.0): MySQL, PostgreSQL, Cassandra, ScyllaDB, HBase, Palo
+- **RPC**: gRPC + Protocol Buffers
+- **API Docs**: Swagger (io.swagger.core.v3)
+- **Storage**: RocksDB (default/embedded), HStore (distributed/production)
+- **Legacy backends** (≤1.5.0): MySQL, PostgreSQL, Cassandra, ScyllaDB, HBase,
Palo
-## Project Version
-- Current version: 1.7.0 (managed via `${revision}` property)
-- Version management uses Maven flatten plugin for CI-friendly versioning
-
-## License
-- Apache License 2.0
-- All code must include Apache license headers
-- Third-party dependencies require proper license documentation
-
-## Repository Structure
-This is a multi-module Maven project
+## Version
+- Current: 1.7.0 (`${revision}` property, Maven flatten plugin)
+- License: Apache License 2.0
Review Comment:
PR title mentions “(1.8.0)”, but this memory (and root `pom.xml`
`<revision>`) indicates current version is 1.7.0. Please align the PR title or
the stated version so the “latest codebase state” reference is consistent.
##########
.serena/project.yml:
##########
@@ -1,15 +1,25 @@
+
+
Review Comment:
This file now starts with two blank lines. Consider removing them so the
YAML begins with the first comment line for cleaner diffs and consistency with
other config files.
```suggestion
```
##########
.serena/memories/suggested_commands.md:
##########
@@ -1,131 +1,56 @@
# Suggested Development Commands
-## Quick Reference
-
-### Prerequisites Check
+## Build
```bash
-java -version # Must be 11+
-mvn -version # Must be 3.5+
+mvn clean install -DskipTests # Full build
+mvn clean install -pl hugegraph-server -am -DskipTests # Server only
+mvn clean compile -U -Dmaven.javadoc.skip=true -ntp # Compile only
+mvn clean package -DskipTests # Distribution →
install-dist/target/
```
-### Build Commands
+## Test
```bash
-# Full build without tests (fastest)
-mvn clean install -DskipTests
-
-# Full build with all tests
-mvn clean install
-
-# Build specific module (e.g., server)
-mvn clean install -pl hugegraph-server -am -DskipTests
-
-# Compile only
-mvn clean compile -U -Dmaven.javadoc.skip=true -ntp
-
-# Build distribution package
-mvn clean package -DskipTests
-# Output: install-dist/target/hugegraph-<version>.tar.gz
-```
-
-### Testing Commands
-```bash
-# Unit tests (memory backend)
-mvn test -pl hugegraph-server/hugegraph-test -am -P unit-test,memory
-
-# Core tests with specific backend
+# Server tests (memory/rocksdb/hbase backends)
+mvn test -pl hugegraph-server/hugegraph-test -am -P unit-test
mvn test -pl hugegraph-server/hugegraph-test -am -P core-test,memory
mvn test -pl hugegraph-server/hugegraph-test -am -P core-test,rocksdb
-mvn test -pl hugegraph-server/hugegraph-test -am -P core-test,hbase
-
-# API tests
mvn test -pl hugegraph-server/hugegraph-test -am -P api-test,rocksdb
-# TinkerPop compliance tests (release branches)
-mvn test -pl hugegraph-server/hugegraph-test -am -P
tinkerpop-structure-test,memory
-mvn test -pl hugegraph-server/hugegraph-test -am -P
tinkerpop-process-test,memory
-
-# Run single test class
+# Single test class
mvn test -pl hugegraph-server/hugegraph-test -am -P core-test,memory
-Dtest=YourTestClass
-# PD module tests (build struct first)
-mvn install -pl hugegraph-struct -am -DskipTests
-mvn test -pl hugegraph-pd/hg-pd-test -am
+# TinkerPop compliance (release/test branches only)
+mvn test -pl hugegraph-server/hugegraph-test -am -P
tinkerpop-structure-test,memory
-# Store module tests (build struct first)
+# PD/Store (build struct first)
mvn install -pl hugegraph-struct -am -DskipTests
+mvn test -pl hugegraph-pd/hg-pd-test -am
mvn test -pl hugegraph-store/hg-store-test -am
```
-### Code Quality & Validation
+## Validation
```bash
-# License header check (Apache RAT)
-mvn apache-rat:check -ntp
-
-# Code style check (EditorConfig)
-mvn editorconfig:check
-
-# Compile with warnings
-mvn clean compile -Dmaven.javadoc.skip=true
+mvn apache-rat:check -ntp # License headers
+mvn editorconfig:check # Code style
+mvn clean compile -Dmaven.javadoc.skip=true # Compile warnings
```
-### Server Operations
+## Server Ops (hugegraph-dist/.../bin/)
```bash
-# Scripts location: hugegraph-server/hugegraph-dist/src/assembly/static/bin/
-
-# Initialize storage backend
-bin/init-store.sh
-
-# Start HugeGraph server
-bin/start-hugegraph.sh
-
-# Stop HugeGraph server
-bin/stop-hugegraph.sh
-
-# Start Gremlin console
-bin/gremlin-console.sh
-
-# Enable authentication
-bin/enable-auth.sh
-
-# Dump effective configuration
-bin/dump-conf.sh
-
-# Monitor server
-bin/monitor-hugegraph.sh
+bin/init-store.sh && bin/start-hugegraph.sh # Init + start
+bin/stop-hugegraph.sh # Stop
+bin/enable-auth.sh # Enable auth
```
-### Git Operations (macOS/Darwin)
+## Docker
```bash
-# View git log (avoid pager)
-git --no-pager log -n 20 --oneline
-
-# View git diff (avoid pager)
-git --no-pager diff
-
-# Check git status
-git status
+cd docker && docker compose up -d # Single-node (bridge network)
+docker compose -f docker-compose-3pd-3store-3server.yml up -d # Cluster
Review Comment:
In the Docker section, `cd docker && ...` doesn’t persist for the next line,
and `docker-compose-3pd-3store-3server.yml` lives under `docker/`. Use a
consistent working directory (e.g., repeat `cd docker && ...`) or reference the
file as `docker/docker-compose-3pd-3store-3server.yml`.
```suggestion
cd docker && docker compose -f docker-compose-3pd-3store-3server.yml up -d
# Cluster
```
##########
.serena/memories/suggested_commands.md:
##########
@@ -1,131 +1,56 @@
# Suggested Development Commands
-## Quick Reference
-
-### Prerequisites Check
+## Build
```bash
-java -version # Must be 11+
-mvn -version # Must be 3.5+
+mvn clean install -DskipTests # Full build
+mvn clean install -pl hugegraph-server -am -DskipTests # Server only
+mvn clean compile -U -Dmaven.javadoc.skip=true -ntp # Compile only
+mvn clean package -DskipTests # Distribution →
install-dist/target/
```
-### Build Commands
+## Test
```bash
-# Full build without tests (fastest)
-mvn clean install -DskipTests
-
-# Full build with all tests
-mvn clean install
-
-# Build specific module (e.g., server)
-mvn clean install -pl hugegraph-server -am -DskipTests
-
-# Compile only
-mvn clean compile -U -Dmaven.javadoc.skip=true -ntp
-
-# Build distribution package
-mvn clean package -DskipTests
-# Output: install-dist/target/hugegraph-<version>.tar.gz
-```
-
-### Testing Commands
-```bash
-# Unit tests (memory backend)
-mvn test -pl hugegraph-server/hugegraph-test -am -P unit-test,memory
-
-# Core tests with specific backend
+# Server tests (memory/rocksdb/hbase backends)
+mvn test -pl hugegraph-server/hugegraph-test -am -P unit-test
Review Comment:
The `-P unit-test` command will still also run the `core-test` surefire
execution because the `core-test` Maven profile is `activeByDefault` in
`hugegraph-server/pom.xml`. If the intent is “unit tests only”, document how to
disable `core-test` (e.g., by deactivating that profile when running unit
tests).
```suggestion
mvn test -pl hugegraph-server/hugegraph-test -am -P unit-test,!core-test #
Unit tests only; disable default-active core-test
```
##########
.serena/memories/suggested_commands.md:
##########
@@ -1,131 +1,56 @@
# Suggested Development Commands
-## Quick Reference
-
-### Prerequisites Check
+## Build
```bash
-java -version # Must be 11+
-mvn -version # Must be 3.5+
+mvn clean install -DskipTests # Full build
+mvn clean install -pl hugegraph-server -am -DskipTests # Server only
+mvn clean compile -U -Dmaven.javadoc.skip=true -ntp # Compile only
+mvn clean package -DskipTests # Distribution →
install-dist/target/
```
-### Build Commands
+## Test
```bash
-# Full build without tests (fastest)
-mvn clean install -DskipTests
-
-# Full build with all tests
-mvn clean install
-
-# Build specific module (e.g., server)
-mvn clean install -pl hugegraph-server -am -DskipTests
-
-# Compile only
-mvn clean compile -U -Dmaven.javadoc.skip=true -ntp
-
-# Build distribution package
-mvn clean package -DskipTests
-# Output: install-dist/target/hugegraph-<version>.tar.gz
-```
-
-### Testing Commands
-```bash
-# Unit tests (memory backend)
-mvn test -pl hugegraph-server/hugegraph-test -am -P unit-test,memory
-
-# Core tests with specific backend
+# Server tests (memory/rocksdb/hbase backends)
+mvn test -pl hugegraph-server/hugegraph-test -am -P unit-test
mvn test -pl hugegraph-server/hugegraph-test -am -P core-test,memory
mvn test -pl hugegraph-server/hugegraph-test -am -P core-test,rocksdb
-mvn test -pl hugegraph-server/hugegraph-test -am -P core-test,hbase
-
-# API tests
mvn test -pl hugegraph-server/hugegraph-test -am -P api-test,rocksdb
-# TinkerPop compliance tests (release branches)
-mvn test -pl hugegraph-server/hugegraph-test -am -P
tinkerpop-structure-test,memory
-mvn test -pl hugegraph-server/hugegraph-test -am -P
tinkerpop-process-test,memory
-
-# Run single test class
+# Single test class
mvn test -pl hugegraph-server/hugegraph-test -am -P core-test,memory
-Dtest=YourTestClass
-# PD module tests (build struct first)
-mvn install -pl hugegraph-struct -am -DskipTests
-mvn test -pl hugegraph-pd/hg-pd-test -am
+# TinkerPop compliance (release/test branches only)
+mvn test -pl hugegraph-server/hugegraph-test -am -P
tinkerpop-structure-test,memory
-# Store module tests (build struct first)
+# PD/Store (build struct first)
mvn install -pl hugegraph-struct -am -DskipTests
+mvn test -pl hugegraph-pd/hg-pd-test -am
mvn test -pl hugegraph-store/hg-store-test -am
```
-### Code Quality & Validation
+## Validation
```bash
-# License header check (Apache RAT)
-mvn apache-rat:check -ntp
-
-# Code style check (EditorConfig)
-mvn editorconfig:check
-
-# Compile with warnings
-mvn clean compile -Dmaven.javadoc.skip=true
+mvn apache-rat:check -ntp # License headers
+mvn editorconfig:check # Code style
+mvn clean compile -Dmaven.javadoc.skip=true # Compile warnings
```
-### Server Operations
+## Server Ops (hugegraph-dist/.../bin/)
```bash
-# Scripts location: hugegraph-server/hugegraph-dist/src/assembly/static/bin/
-
-# Initialize storage backend
-bin/init-store.sh
-
-# Start HugeGraph server
-bin/start-hugegraph.sh
-
-# Stop HugeGraph server
-bin/stop-hugegraph.sh
-
-# Start Gremlin console
-bin/gremlin-console.sh
-
-# Enable authentication
-bin/enable-auth.sh
-
-# Dump effective configuration
-bin/dump-conf.sh
-
-# Monitor server
-bin/monitor-hugegraph.sh
+bin/init-store.sh && bin/start-hugegraph.sh # Init + start
+bin/stop-hugegraph.sh # Stop
+bin/enable-auth.sh # Enable auth
Review Comment:
The “Server Ops” commands assume a `bin/` directory in the current working
directory, but this repo doesn’t have a top-level `bin/`. Please specify the
correct path (e.g., under
`hugegraph-server/hugegraph-dist/src/assembly/static/bin/`) or clarify that
these commands are meant to be run from an extracted distribution package.
--
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]