Skip to content

[Task] Support HugeGraph with RocksDB on RISC-V #3099

Description

@imbajin

Goal

Make HugeGraph Server with the embedded RocksDB backend:

  1. build successfully in a real linux/riscv64 userspace in CI; and
  2. pass a basic RocksDB and HugeGraph runtime smoke test.

QEMU and containers may be used as the CI execution environment. They are test
infrastructure only: this task does not require an official RISC-V image, Dockerfile
changes, or image publication.

Scope

In scope

  • hugegraph-server and the embedded RocksDB backend
  • RISC-V architecture detection in the Maven build
  • a working RISC-V Protobuf/gRPC code-generation strategy
  • an opt-in Server/RocksDB-only build and packaging path that avoids unrelated backends
  • a supported Java 11 runtime path for the CI smoke test
  • automatic or explicitly configured libatomic.so.1 support for the packaged RocksDB JNI
  • an isolated CI job running in linux/riscv64 userspace, with QEMU acceptable
  • basic runtime smoke coverage:
    • RocksDB open, put/get, close, and reopen
    • HugeGraph InitStore and Server startup
    • /versions
    • REST schema and graph CRUD
    • one Gremlin query
    • restart and persistence verification
  • confirmation that existing non-RISC-V Java 11 build and test paths remain unchanged
  • concise documentation of the tested CI environment, commands, and limitations

Minimal build-only changes to transitive modules such as protobuf/gRPC generation are
allowed when they are required to compile the Server dependency graph. They do not imply
runtime support for those modules on RISC-V.

Out of scope

  • official HugeGraph Dockerfile or entrypoint changes
  • building or publishing an official linux/riscv64 HugeGraph image
  • multi-architecture image manifests or release-image validation
  • a standalone local Docker/QEMU helper for contributors
  • mandatory full RocksDB core-test or api-test suites on RISC-V
  • HugeGraph PD, Store, HStore, or any backend other than RocksDB
  • native-hardware or hosted-RISC-V release gates
  • production performance, sustained-load, or tuning certification
  • 32-bit RISC-V, musl, or Alpine support
  • claiming a broad minimum-glibc compatibility range from a single CI environment

Why work is needed

HugeGraph is mostly Java, but the RISC-V path crosses several native and build-tool
boundaries. A successful Java compile or RocksDB.loadLibrary() call alone is not enough.

Area Confirmed problem Required outcome
Architecture detection Older os-maven-plugin versions normalize riscv64 incorrectly Maven identifies riscv64 and activates the required build path
Protobuf generation Maven Central does not provide the required linux-riscv64 protoc executable for the pinned version CI uses a documented compatible native protoc/gRPC generator strategy
RocksDB JNI rocksdbjni:8.10.2 contains a RISC-V library but real I/O fails with undefined symbol: __atomic_compare_exchange_1 without libatomic Real open/put/get/reopen succeeds without undocumented manual intervention
Java runtime JDK 17 starts parts of the Server, but the current TinkerPop/Groovy stack fails Gremlin with Unsupported class file major version 61 Select and validate one Java 11 RISC-V runtime path, including Gremlin
Distribution The standard distribution depends on unrelated backend modules Provide an explicit RocksDB-only build/package selection while preserving the default build

The CI environment should record the actual JDK, architecture, and libc used. An ELF
symbol requirement such as GLIBC_2.30 may be documented as technical information, but
must not be presented as a fully tested support range unless that range is actually
validated.

Implementation direction

The intended path is:

RISC-V CI userspace
  -> clean Server/RocksDB-only Maven build
  -> compatible native protobuf generation
  -> RocksDB-only distribution boundary check
  -> RocksDB JNI I/O smoke
  -> HugeGraph REST + Gremlin + restart/persistence smoke

The root/default reactor, existing Dockerfiles, existing image publication, and existing
JDK/build/test paths for other architectures should remain unchanged.

Done when

  • CI runs in a real linux/riscv64 userspace and asserts uname -m == riscv64;
    QEMU is acceptable.
  • A clean Server/RocksDB-only Maven build succeeds without building or packaging
    unrelated backend implementations.
  • The RISC-V protobuf/gRPC generation strategy works in CI and is documented.
  • The produced distribution contains the required Server/RocksDB artifacts and
    excludes unrelated backend artifacts.
  • RocksDB JNI passes open, put/get, close, and reopen without native linkage errors.
  • HugeGraph passes InitStore, startup, /versions, REST schema/graph CRUD, one
    Gremlin query, restart, and persistence checks.
  • The smoke test leaves no running Server process or CI container after completion.
  • Existing Java 11 and non-RISC-V build/test paths remain unchanged and green.
  • Documentation clearly states that this is CI build/runtime validation only, not an
    official RISC-V image, production certification, or support for other backends.

Full RISC-V Core/API suites, a local no-hardware helper, native-machine validation, and
official image publication may be handled as separate follow-up work, but they are not
acceptance criteria for this task.

Related work

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    ci-cdBuild or deploydocDocument expectedfeatureNew featuregood first issueGood for newcomershelp wantedExtra attention is neededimprovementGeneral improvementjavaPull requests that update java coderocksdbRocksDB backendtestsAdd or improve test cases

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions