From d818aefbb7b268b94e8b5136943be96c19c1208b Mon Sep 17 00:00:00 2001 From: VGalaxies Date: Sun, 10 Sep 2023 23:04:41 +0800 Subject: [PATCH] chore: load driver version in graph store for hstore --- .../hugegraph/backend/store/BackendStoreInfo.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendStoreInfo.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendStoreInfo.java index b6b09d2a9f..77d4fd51bf 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendStoreInfo.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/store/BackendStoreInfo.java @@ -41,12 +41,14 @@ public boolean exists() { } public boolean checkVersion() { - if (this.storeProvider.isHstore()) { // skip for hstore now - return true; + BackendStore store; + if (this.storeProvider.isHstore()) { + store = this.storeProvider.loadGraphStore(this.config); + } else { + store = this.storeProvider.loadSystemStore(this.config); } String driverVersion = this.storeProvider.driverVersion(); - String storedVersion = this.storeProvider.loadSystemStore(this.config) - .storedVersion(); + String storedVersion = store.storedVersion(); if (!driverVersion.equals(storedVersion)) { LOG.error("The backend driver version '{}' is inconsistent with " + "the data version '{}' of backend store for graph '{}'",