bitflicker64 commented on PR #3375:
URL: https://github.com/apache/hugegraph/pull/3375#issuecomment-6550182367

   The earlier review comments below still apply at c4dd64e; this head does not 
fix them.
   
   - Important: Blocking: yes. Summary: Making `serializerName()="binary"` and 
`acceptsOtherSerializer()=false` the interface defaults applies the 
hstore/rocksdb rule to every backend that does not override them, including 
plugin backends. A plugin registered through 
`HugeGraphPlugin.registerBackend()` and `registerSerializer()` (loaded by 
`RegisterUtil` via `ServiceLoader`) inherits these defaults. If its graph 
config names its own serializer, for example `serializer=myserializer`, the 
graph now fails to open with `The <x> backend requires serializer=binary`. If 
the config has no serializer line, the plugin silently gets `binary` where it 
used to get `text`. Evidence: `HugeGraphPlugin.java:39-45` exposes both 
registration hooks; `AbstractBackendStoreProvider` does not override either 
method; `StandardHugeGraph.serializerName()` throws whenever `configured != 
backendDefault && !provider.acceptsOtherSerializer()`. Requested change: make 
the interface default lenient (`acceptsOtherSeri
 alizer()` returning true; for `serializerName()`, consider keeping the old 
`text` fallback or requiring an override). Then override both methods in 
`RocksDBStoreProvider` (which `RocksDBSstStoreProvider` inherits) and 
`HstoreProvider`, so only the backends that really parse binary keys refuse 
another serializer. Add a test that a provider which does not override the 
methods still accepts an explicit serializer. 
(https://github.com/apache/hugegraph/pull/3375#discussion_r4334091457)
   - Important: Blocking: yes. Summary: This config, like the system-graph 
config in `GraphManager` (the removed `sysGraphConfig.put("serializer", 
"binary")`), is persisted to PD meta and loaded by every other server. With the 
line gone, the stored config has no `serializer`. A server still on the 
previous release in the same cluster (during a rolling upgrade, or after a 
downgrade) opens these graphs with its old `CoreOptions.SERIALIZER` default 
`text` on hstore. It writes rows through `TextSerializer` that can never be 
read back, which is the #3225 failure this PR fixes. Evidence: 
`GraphManager.createGraph` calls `metaManager.addGraphConfig(graphSpace, name, 
configs)` then `notifyGraphAdd`; other servers rebuild the graph in 
`loadAddedGraph` from `metaManager.getGraphConfig(...)`; the system graph 
config goes through `metaManager.addSysGraphConfig`; on the base commit 
`CoreOptions.SERIALIZER` is `disallowEmpty(), "text"`. Requested change: keep 
writing the serializer the backend res
 olves into the persisted config for hstore and rocksdb, for example 
`putIfAbsent("serializer", "binary")` when the backend is hstore or rocksdb 
here and in `sysGraphConfig`. The new check accepts an explicit `binary` on 
those backends, so this costs nothing and keeps the meta readable by older 
servers until the option is removed. 
(https://github.com/apache/hugegraph/pull/3375#discussion_r4334091462)


-- 
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]

Reply via email to