Skip to content

feat(rocksdb): add optional ToplingDB integration - #3134

Open
kenssa4eedfd wants to merge 97 commits into
apache:masterfrom
hugegraph:toplingdb
Open

feat(rocksdb): add optional ToplingDB integration#3134
kenssa4eedfd wants to merge 97 commits into
apache:masterfrom
hugegraph:toplingdb

Conversation

@kenssa4eedfd

Copy link
Copy Markdown
Contributor

Purpose of the PR

This PR introduces ToplingDB as an optional RocksDB-compatible storage engine
for HugeGraph.

ToplingDB is explicitly enabled through configuration. Standard RocksDB remains
the default, so existing deployments and data paths are unaffected unless
rocksdb.provider=topling is configured.

Main Changes

  • Add explicit storage engine selection through rocksdb.provider.
  • Integrate ToplingDB with HugeGraph Server, PD, and Store.
  • Use ToplingDB Easy Migrate YAML configuration while continuing to use the
    standard RocksDB Java API.
  • Add component-specific configurations for Server, PD, and Store, including
    separate HTTP ports and JRaft column-family settings.
  • Add startup scripts that:
    • Select and preload the ToplingDB JNI library.
    • Extract required native libraries and Web UI resources.
    • Configure LD_PRELOAD, LD_LIBRARY_PATH, and
      TOPLINGDB_EASY_MIGRATE_CONF.
    • Validate the operating system and architecture.
    • Verify downloaded dependencies using SHA-256.
    • Handle jemalloc and Ubuntu 24.04 libaio compatibility.
  • Align the RocksDB JNI version across Server, PD, and Store.
  • Update CI workflows to install and test the ToplingDB runtime dependencies.
  • Update third-party dependency metadata, LICENSE information, operational
    documentation, troubleshooting guides, and security notes.

Compatibility

  • Standard RocksDB remains the default provider.
  • Existing RocksDB data and APIs remain compatible.
  • ToplingDB is enabled only when rocksdb.provider=topling is configured.
  • No public HugeGraph API changes are introduced.
  • The bundled ToplingDB runtime currently targets Linux x86_64.

Verifying these changes

  • Trivial rework / code cleanup without any test coverage. (No Need)
  • Already covered by existing tests, such as (please modify tests here).
  • Need tests and can be verified as follows:
    • Build all modules:
      mvn clean compile -Dmaven.javadoc.skip=true                                                                                                                                                        
    • Run HugeGraph Server tests with the RocksDB backend:
      mvn test -pl hugegraph-server/hugegraph-test -am \                                                                                                                                                 
        -P core-test,rocksdb                                                                                                                                                                             
    • Run PD tests:
      mvn install -pl hugegraph-struct -am -DskipTests                                                                                                                                                   
      mvn test -pl hugegraph-pd/hg-pd-test -am                                                                                                                                                           
    • Run Store tests:
      mvn test -pl hugegraph-store/hg-store-test -am                                                                                                                                                     
    • Verify Server, PD, and Store startup in both standard RocksDB mode and
      ToplingDB mode.

Does this PR potentially affect the following parts?

  • Dependencies
  • Modify configurations
  • The public API
  • Other affects: startup scripts, native library loading, and CI workflows
  • Nope

Documentation Status

  • Doc - TODO
  • Doc - Done
  • Doc - No Need

imbajin and others added 30 commits June 12, 2025 14:08
[pull] master from apache:master
[pull] master from apache:master
Co-authored-by: Hervé Boutemy <herve.boutemy@free.fr>
* refactor: Delete the package existing in java8

* chore(format): remove custom line breaks
@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:XXL This PR changes 1000+ lines, ignoring generated files. labels Aug 30, 2026
- package component-local helpers for Server, PD, and Store
- separate standard and Topling distribution contents
- fail fast on invalid or incomplete Topling runtime selection
- validate clean artifacts and real provider loading in CI
- add a discoverable ToplingDB documentation entry point
- document standalone and HStore configuration paths
- describe build, test, CI, and native runtime workflows
- define volume isolation, monitoring, and rollback safety
@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Aug 30, 2026
- close graph transactions after OLTP algorithm execution
- keep failures visible while releasing traversal resources
- cover success and failure paths in the unit suite
- build standard and amd64 Topling targets with provenance labels
- isolate provider data paths with fail-atomic marker checks
- add standalone and distributed Compose deployment paths
- validate runtime packaging, lifecycle, and provider selection in CI
- forward TERM to the Server process
- stop waiting after child becomes an unreaped zombie
- preserve nonzero status for unexpected Server exits
- cover process-group SIGTERM in the entrypoint regression
- destroy thread-local transactions after commit and rollback
- clean Gremlin worker transactions before resetting context
- keep multi-graph cleanup isolated and concurrency-safe
- make RocksDB opened checks free of session side effects
- cover cleanup failures and session state regressions
- preserve column families while truncating Topling data
- balance temporary RocksDB session ownership
- handle SIGTERM safely throughout container startup
- keep schema transactions usable after intermediate commits
- preserve existing Ubuntu 24 required runtime checks
- exercise Server, PD, and Store Topling runtimes on native Ubuntu 26 x64
- keep preview-runner or dependency failures non-blocking
- resolve Docker README and entrypoint test conflicts
- retain Topling provider lifecycle and runtime guards
- align standalone, HStore, dev, and HA Compose overlays
- add standalone Topling overlay and render contracts
- keep master Docker topology and authentication changes
- bind search filters to the original logical query
- cover committed HStore IN and search regressions
- keep sub-query input ordering behavior unchanged
imbajin added 15 commits August 31, 2026 18:18
- inject provider images, roots, and isolated volumes through env

- reuse standalone, HStore, dev, and HA topology files

- remove duplicated Topling-only Compose overlays

- update render contracts, CI, and user/developer commands
- match the dev override image selected by the generic HStore topology
- keep the Topling PD and Store parameter checks unchanged
- preserve standalone and HA production image contracts
- replace obsolete overlay wording with environment injection
- distinguish standalone and HStore provider ownership
- keep the standard HStore Server guidance explicit
- point the Store data-path example at application-pd.yml
- keep the PD application.yml example unchanged
- align the quickstart prose with the component table
- document generic Compose rocksdb defaults
- require provider, root, marker, and volume together
- prevent image-only switches from masking data safety
- assert provider mismatch leaves the existing marker intact
- assert unmarked data and files survive fail-fast validation
- cover rollback safety at the entrypoint boundary
Document native Linux and macOS container targets.
Explain linux/amd64 platform selection for Docker engines.
Exclude native macOS execution from Topling acceptance scope.
Keep standard and Topling topology guidance unchanged.
• align image defaults with standalone and HStore files
• document the fixed Hubble image and pull policy
• keep generic Topling parameter guidance accurate
- state that sample monitors are disabled by default\n- document explicit loopback-only enablement\n- align operations guidance with bundled YAML
- use numeric JDK version comparison in PD and Store\n- quote the PD process-count command substitution\n- avoid checksum wildcard matching in the helper
- exclude lib/topling from standard Server classpath scans\n- keep explicit preload as the only Topling classpath path\n- add fake-JVM regression for provider fallback isolation\n- document the standard-provider fallback contract
- exclude optional Topling jars from init-store scans
- preserve explicit Topling preload classpath selection
- extend fake-JVM regression coverage to init-store
- cover all launcher jar-scan categories
- resolve library paths before excluding the Topling subtree
- share canonical filtering across Server and init-store
- cover direct-file and directory symlink aliases
- document standard-provider classpath isolation
- retain jar-only init-store classpath scanning
- stop following library directory symlink aliases
- emit canonical regular-file classpath entries
- cover non-jar and symlink fixtures in selector tests
- preserve classpath paths containing spaces
- quote extension and plugin library scans
- exercise launchers from a spaced fixture path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-cd Build or deploy dependencies Incompatible dependencies of package feature New feature size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants