Skip to content

Support Nacos on Linux RISC-V with RocksDB #15640

Closed

Description

@KomachiSion

Is your feature request related to a problem? Please describe.

Nacos currently resolves org.rocksdb:rocksdbjni:8.8.1 through jraft-core. That artifact does not contain a Linux RISC-V (riscv64) JNI library, so a Nacos server that initializes RocksDB cannot start on this architecture.

rocksdbjni:8.10.2 contains librocksdbjni-linux-riscv64.so. On Linux RISC-V, the packaged JNI library also needs the system libatomic.so.1 to be loaded before the JVM initializes RocksDB.

Describe the solution you'd like

  • Manage rocksdbjni at version 8.10.2 in the Nacos dependency tree.
  • Explicitly load the RocksDB JNI library for the Config RocksDB dump backend, because this RocksDB version no longer loads it from the RocksDB class initializer.
  • In startup.sh, detect Linux riscv64 and append a readable libatomic.so.1 path to LD_PRELOAD before starting Java.
  • Preserve the existing startup behavior on every other OS/architecture, and also preserve it on RISC-V when no readable libatomic.so.1 can be found.

Describe alternatives you've considered

Users can manually override the RocksDB dependency and export LD_PRELOAD, but this is easy to miss and does not make the standard Nacos distribution directly usable on RISC-V.

Additional context

Apache HugeGraph addressed the same RocksDB RISC-V runtime requirements in apache/hugegraph#3102. This request is limited to Linux riscv64; it does not change the behavior or support claims for other architectures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesPull requests that update a dependency file

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions