bitflicker64 commented on code in PR #3330:
URL: https://github.com/apache/hugegraph/pull/3330#discussion_r4267202233
##########
hugegraph-store/hg-store-core/src/main/java/org/apache/hugegraph/store/business/BusinessHandlerImpl.java:
##########
@@ -1490,7 +1500,7 @@ public RocksDBSession getSession(int partId) throws
HgStoreException {
long version =
HgStoreEngine.getInstance().getCommittedIndex(partId);
dbSession =
factory.createGraphDB(partitionManager.getDbDataPath(partId, dbName), dbName,
- version);
+ version, path ->
GraphIdManager.checkLegacyGraphIdData(path, partId));
Review Comment:
Important: a refusal from this validator stops every partition on the Store,
not only the affected one.
`PartitionManager.loadPartitions` (line 271) reaches this path through
`wrapper.scan` with no catch, so the first affected partition aborts the loop
and later partitions are never loaded. `HgStoreEngine.stateChanged` only
catches `InvalidShardException`, so the exception escapes before
`restoreLocalPartitionEngine` runs and no Raft group starts, while the Store
stays registered Up. Raft replicas hold the same rows, so with 3 Stores and 3
replicas one affected partition takes every partition in the cluster offline.
The PR's own tests assert that `loadPartition` throws.
Catch the refusal per partition in `loadPartitions` (log it and skip that
partition), or fail the Store explicitly through `requestExit`, and document
which one is intended. Add a two-partition test.
--
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]