You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .specs/hugegraph-server/ToplingDB/design.md
+51-34Lines changed: 51 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,34 +40,39 @@ sequenceDiagram
40
40
41
41
### RocksDB Startup Logic
42
42
43
-
Use reflection to detect whether ToplingDB APIs are available. If present, attempt to start the storage engine using ToplingDB; otherwise, fall back to standard RocksDB APIs.
43
+
HugeGraph routes the main RocksDB open/close paths through `RocksDBProviderLoader`.
44
+
Providers are discovered via Java SPI, but the active provider is selected explicitly by
"The RocksDB engine provider. 'standard' for vanilla RocksDB, "
195
+
+"'topling' for ToplingDB (requires addon installation).",
196
+
allowValues("standard", "topling"),
197
+
"standard"
198
+
);
199
+
184
200
publicstaticfinalConfigOption<String>OPTION_PATH=
185
201
newConfigOption<>(
186
202
"rocksdb.option_path",
@@ -200,29 +216,30 @@ public static final ConfigOption<Boolean> OPEN_HTTP =
200
216
201
217
### ToplingDB Startup Logic
202
218
203
-
When `option_path` is configured and the JAR contains ToplingDB APIs, HugeGraph will load the YAML file and start ToplingDB. Otherwise, it falls back to standard RocksDB.
219
+
When `rocksdb.provider=topling`, `option_path` is configured, pre-validation passes, and the JAR
220
+
contains ToplingDB APIs, HugeGraph will load the YAML file and start ToplingDB. If
221
+
`rocksdb.provider=standard`, HugeGraph uses standard RocksDB.
204
222
205
-
To keep port configuration simple, the Web Server is only enabled for the `GRAPH_STORE` instance.
223
+
For HugeGraph Server, the Web Server is only enabled for the `GRAPH_STORE` instance. PD and
224
+
Store pass their component-level HTTP flag to the provider.
3. Review the specific error message in the logs for further clues.
25
25
26
+
HugeGraph performs basic path and YAML validation before enabling ToplingDB. If this
27
+
pre-validation fails, HugeGraph falls back to standard RocksDB behavior inside the ToplingDB
28
+
provider. If the file passes basic YAML validation but `SidePluginRepo.importAutoFile()` or
29
+
`openDB()` fails, startup fails with the corresponding ToplingDB error and the YAML file should
30
+
be fixed.
31
+
26
32
---
27
33
28
-
### Issue 2: Web Server Port Conflict
34
+
### Issue 2: ToplingDB Provider Not Available
35
+
36
+
When `rocksdb.provider=topling` is configured but the runtime `rocksdbjni` JAR does not contain
37
+
`org.rocksdb.SidePluginRepo`, HugeGraph fails provider activation instead of silently switching
38
+
to the standard provider.
39
+
40
+
**Solution**:
41
+
42
+
1. If you want standard RocksDB, set:
43
+
44
+
```properties
45
+
rocksdb.provider=standard
46
+
```
47
+
48
+
2. If you want ToplingDB, confirm that Maven or the deployment addon provides a ToplingDB-capable
49
+
`rocksdbjni` artifact.
50
+
3. Inspect the runtime JAR:
51
+
52
+
```bash
53
+
jar tf lib/rocksdbjni-*.jar | grep org/rocksdb/SidePluginRepo.class
54
+
```
55
+
56
+
---
57
+
58
+
### Issue 3: Web Server Port Conflict
29
59
30
60
Sample log output:
31
61
32
62
```java
33
-
2025-10-1501:57:34 [db-open-1] [INFO] o.a.h.b.s.r.RocksDBStdSessions-SidePluginRepo found. Will attempt to open multi CFsRocksDB using Topling plugin.
63
+
2025-10-1501:57:34 [db-open-1] [INFO] o.a.h.r.p.ToplingRocksDBProvider-SidePluginRepo found. Will attempt to open defaultCFRocksDB using Topling.
34
64
2025-10-1501:57:34 [db-open-1] [ERROR] o.a.h.b.s.r.RocksDBStore-Failed to open RocksDB'rocksdb-data/data/g'
35
65
org.rocksdb.RocksDBException: rocksdb::Status rocksdb::SidePluginRepo::StartHttpServer():null context when constructing CivetServer. Possible problem binding to port.
36
66
at org.rocksdb.SidePluginRepo.startHttpServer(NativeMethod) ~[rocksdbjni-8.10.2-20250804.074027-4.jar:?]
0 commit comments