From 9cf9fd9584b3c78fef814d9e35b6fc0fd3ef01f4 Mon Sep 17 00:00:00 2001 From: Peng Junzhi <201250214@smail.nju.edu.cn> Date: Mon, 29 Jan 2024 22:51:32 +0800 Subject: [PATCH 01/15] fix global sharing schemaCache into exclusive schemaGraph --- .../hugegraph/backend/cache/CachedSchemaTransactionV2.java | 2 +- .../main/java/org/apache/hugegraph/core/MultiGraphsTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedSchemaTransactionV2.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedSchemaTransactionV2.java index b29a4227c7..2e0f3d3073 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedSchemaTransactionV2.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedSchemaTransactionV2.java @@ -87,7 +87,7 @@ public void close() { private Cache cache(String prefix, long capacity) { // TODO: uncomment later - graph space //final String name = prefix + "-" + this.graph().spaceGraphName(); - final String name = prefix + "-" + ""; + final String name = prefix + "-" + this.graphName(); // NOTE: must disable schema cache-expire due to getAllSchema() return CacheManager.instance().cache(name, capacity); } diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/MultiGraphsTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/MultiGraphsTest.java index 3b468ba458..2dad81bb6e 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/MultiGraphsTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/MultiGraphsTest.java @@ -211,8 +211,8 @@ public void testCopySchemaWithMultiGraphsWithConflict() { g1.serverStarted(GlobalMasterInfo.master("server-g1c")); g2.serverStarted(GlobalMasterInfo.master("server-g2c")); - g1.schema().propertyKey("id").asInt().create(); - g2.schema().propertyKey("id").asText().create(); + g1.schema().propertyKey("id").asInt().checkExist(false).create(); + g2.schema().propertyKey("id").asText().checkExist(false).create(); Assert.assertThrows(ExistedException.class, () -> { g2.schema().copyFrom(g1.schema()); From 0e391624675a528ae2c53a48389a0e6b65d24d66 Mon Sep 17 00:00:00 2001 From: Peng Junzhi <201250214@smail.nju.edu.cn> Date: Wed, 7 Feb 2024 18:16:50 +0800 Subject: [PATCH 02/15] fix: before test cache error --- .../apache/hugegraph/backend/cache/CacheManager.java | 4 ++++ .../backend/cache/CachedSchemaTransactionV2.java | 2 -- .../java/org/apache/hugegraph/core/BaseCoreTest.java | 7 +++++++ .../org/apache/hugegraph/core/MultiGraphsTest.java | 10 +++++----- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CacheManager.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CacheManager.java index dd1b4f9b5f..b0b3f24720 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CacheManager.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CacheManager.java @@ -151,4 +151,8 @@ public Cache levelCache(HugeGraph graph, String name, "Invalid cache implement: %s", cache.getClass()); return cache; } + + public void clearCache() { + this.caches.clear(); + } } diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedSchemaTransactionV2.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedSchemaTransactionV2.java index 2e0f3d3073..ab6efeb392 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedSchemaTransactionV2.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedSchemaTransactionV2.java @@ -85,8 +85,6 @@ public void close() { } private Cache cache(String prefix, long capacity) { - // TODO: uncomment later - graph space - //final String name = prefix + "-" + this.graph().spaceGraphName(); final String name = prefix + "-" + this.graphName(); // NOTE: must disable schema cache-expire due to getAllSchema() return CacheManager.instance().cache(name, capacity); diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java index df9932ab8e..8051457dc8 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java @@ -21,6 +21,7 @@ import org.apache.hugegraph.HugeGraph; import org.apache.hugegraph.HugeGraphParams; +import org.apache.hugegraph.backend.cache.CacheManager; import org.apache.hugegraph.backend.store.BackendFeatures; import org.apache.hugegraph.dist.RegisterUtil; import org.apache.hugegraph.masterelection.GlobalMasterInfo; @@ -90,6 +91,7 @@ public static void clear() { public void setup() { this.clearData(); this.clearSchema(); + this.clearCache(); } @After @@ -146,6 +148,11 @@ private void clearSchema() { }); } + private void clearCache() { + CacheManager cacheManager = CacheManager.instance(); + cacheManager.clearCache(); + } + protected void mayCommitTx() { // Commit tx probabilistically for test if (new Random().nextBoolean()) { diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/MultiGraphsTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/MultiGraphsTest.java index 2dad81bb6e..6bd1f9fd4d 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/MultiGraphsTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/MultiGraphsTest.java @@ -92,11 +92,11 @@ public void testCopySchemaWithMultiGraphs() { SchemaManager schema = g1.schema(); - schema.propertyKey("id").asInt().create(); - schema.propertyKey("name").asText().create(); - schema.propertyKey("age").asInt().valueSingle().create(); - schema.propertyKey("city").asText().create(); - schema.propertyKey("weight").asDouble().valueList().create(); + schema.propertyKey("id").asInt().checkExist(false).create(); + schema.propertyKey("name").asText().checkExist(false).create(); + schema.propertyKey("age").asInt().valueSingle().checkExist(false).create(); + schema.propertyKey("city").asText().checkExist(false).create(); + schema.propertyKey("weight").asDouble().valueList().checkExist(false).create(); schema.propertyKey("born").asDate().ifNotExist().create(); schema.propertyKey("time").asDate().ifNotExist().create(); From 8b66701d9dd0f2b81bf125883724cf8ef2136c30 Mon Sep 17 00:00:00 2001 From: Peng Junzhi <201250214@smail.nju.edu.cn> Date: Mon, 19 Feb 2024 22:34:40 +0800 Subject: [PATCH 03/15] fix: add comment --- .../hugegraph/backend/cache/CachedSchemaTransactionV2.java | 1 + 1 file changed, 1 insertion(+) diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedSchemaTransactionV2.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedSchemaTransactionV2.java index 3f24f4ced6..e6a5e78533 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedSchemaTransactionV2.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedSchemaTransactionV2.java @@ -85,6 +85,7 @@ public void close() { } private Cache cache(String prefix, long capacity) { + // TODO: uncomment later - graph space final String name = prefix + "-" + this.graphName(); // NOTE: must disable schema cache-expire due to getAllSchema() return CacheManager.instance().cache(name, capacity); From bfbec025fe3355b96fb2a74d5b51e6c9c25ccbc6 Mon Sep 17 00:00:00 2001 From: Peng Junzhi <201250214@smail.nju.edu.cn> Date: Mon, 19 Feb 2024 22:42:40 +0800 Subject: [PATCH 04/15] fix: uncomment cache --- .../src/main/java/org/apache/hugegraph/core/BaseCoreTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java index 22ecad7f17..29be598484 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java @@ -91,7 +91,7 @@ public static void clear() { public void setup() { this.clearData(); this.clearSchema(); - this.clearCache(); +// this.clearCache(); } @After From 449927f421b7f0d8ed3299a108a8b707c772d04d Mon Sep 17 00:00:00 2001 From: Peng Junzhi <201250214@smail.nju.edu.cn> Date: Sun, 25 Feb 2024 11:25:54 +0800 Subject: [PATCH 05/15] add some question --- .../src/main/java/org/apache/hugegraph/core/BaseCoreTest.java | 2 ++ .../src/main/java/org/apache/hugegraph/core/EdgeCoreTest.java | 1 + 2 files changed, 3 insertions(+) diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java index 29be598484..b25bb0a9bb 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java @@ -91,6 +91,8 @@ public static void clear() { public void setup() { this.clearData(); this.clearSchema(); + // QUESTION: here we should consider to clear cache + // but with this line of code, many ci will fail // this.clearCache(); } diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/EdgeCoreTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/EdgeCoreTest.java index bccf211b99..748ccf1e4a 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/EdgeCoreTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/EdgeCoreTest.java @@ -5195,6 +5195,7 @@ public void testScanEdgeInPaging() { query.scan(String.valueOf(Long.MIN_VALUE), String.valueOf(Long.MAX_VALUE)); } else { + // QUESTION:The query method may not be well adapted query.scan(BackendTable.ShardSplitter.START, BackendTable.ShardSplitter.END); } From 982520a2b85e1fc5db50fdc2f40002444f0e785e Mon Sep 17 00:00:00 2001 From: Peng Junzhi <201250214@smail.nju.edu.cn> Date: Sun, 25 Feb 2024 11:25:29 +0800 Subject: [PATCH 06/15] migrate api fix --- .../hugegraph/backend/store/hstore/HstoreSessionsImpl.java | 5 +++-- .../apache/hugegraph/store/client/grpc/KvPageScanner.java | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hugegraph-server/hugegraph-hstore/src/main/java/org/apache/hugegraph/backend/store/hstore/HstoreSessionsImpl.java b/hugegraph-server/hugegraph-hstore/src/main/java/org/apache/hugegraph/backend/store/hstore/HstoreSessionsImpl.java index 27de0e029b..60cf48891d 100755 --- a/hugegraph-server/hugegraph-hstore/src/main/java/org/apache/hugegraph/backend/store/hstore/HstoreSessionsImpl.java +++ b/hugegraph-server/hugegraph-hstore/src/main/java/org/apache/hugegraph/backend/store/hstore/HstoreSessionsImpl.java @@ -247,7 +247,7 @@ public ColumnIterator(String table, T results, byte[] keyBegin, this.gotNext = false; // QUESTION: Resetting the position may result in the caller being unable to // retrieve the corresponding position. - // this.position = null; + this.position = null; } if (!ArrayUtils.isEmpty(this.keyBegin) || !ArrayUtils.isEmpty(this.keyEnd)) { @@ -320,7 +320,7 @@ public boolean hasNext() { } else { // QUESTION: Resetting the position may result in the caller being unable to // retrieve the corresponding position. - // this.position = null; +// this.position = null; } return gotNext; } @@ -741,6 +741,7 @@ public BackendColumnIterator scan(String table, byte[] ownerKeyFrom, public BackendColumnIterator scan(String table, int codeFrom, int codeTo, int scanType, byte[] query) { + // 可以把 table 过滤掉 assert !this.hasChanges(); HgKvIterator iterator = this.graph.scanIterator(table, codeFrom, codeTo, 256, diff --git a/hugegraph-store/hg-store-client/src/main/java/org/apache/hugegraph/store/client/grpc/KvPageScanner.java b/hugegraph-store/hg-store-client/src/main/java/org/apache/hugegraph/store/client/grpc/KvPageScanner.java index e6ed4a729e..6f1638365b 100644 --- a/hugegraph-store/hg-store-client/src/main/java/org/apache/hugegraph/store/client/grpc/KvPageScanner.java +++ b/hugegraph-store/hg-store-client/src/main/java/org/apache/hugegraph/store/client/grpc/KvPageScanner.java @@ -196,8 +196,8 @@ public boolean hasNext() { } // QUESTION: After `this.iterator.hasNext()` evaluates to false, // no further attempts are made to reconstruct the iterator. - if (this.iterator != null) { - return this.iterator.hasNext(); + if (this.iterator != null && this.iterator.hasNext()) { + return true; } long start = 0; boolean debugEnabled = log.isDebugEnabled(); From cc62b4806a1eab7e423531b4ebdf1289a395c0d2 Mon Sep 17 00:00:00 2001 From: Peng Junzhi <201250214@smail.nju.edu.cn> Date: Sun, 25 Feb 2024 11:46:12 +0800 Subject: [PATCH 07/15] skip grpc check --- pom.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pom.xml b/pom.xml index 7442ff1960..5d1dae2738 100644 --- a/pom.xml +++ b/pom.xml @@ -181,6 +181,9 @@ **/hbase-*/** **/apache-cassandra-*/** **/pid + + **/src/main/java/org/apache/hugegraph/pd/grpc/** + **/src/main/java/org/apache/hugegraph/store/grpc/** true From a63dbbb71abb0aef26a8b2975f5ff5a7c0a34aba Mon Sep 17 00:00:00 2001 From: Peng Junzhi <201250214@smail.nju.edu.cn> Date: Sun, 25 Feb 2024 17:28:08 +0800 Subject: [PATCH 08/15] skip tmp file license check --- pom.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5d1dae2738..b887e511e4 100644 --- a/pom.xml +++ b/pom.xml @@ -177,10 +177,11 @@ .repository/** **/.flattened-pom.xml - **/rocksdb-*/** + **/rocksdb*/** **/hbase-*/** **/apache-cassandra-*/** **/pid + **/tmp/** **/src/main/java/org/apache/hugegraph/pd/grpc/** **/src/main/java/org/apache/hugegraph/store/grpc/** From cdd751cbf258bba586e862298e5cb20498615dd9 Mon Sep 17 00:00:00 2001 From: Peng Junzhi <201250214@smail.nju.edu.cn> Date: Mon, 26 Feb 2024 00:09:17 +0800 Subject: [PATCH 09/15] Revert "migrate api fix" This reverts commit 982520a2b85e1fc5db50fdc2f40002444f0e785e. --- .../hugegraph/backend/store/hstore/HstoreSessionsImpl.java | 5 ++--- .../apache/hugegraph/store/client/grpc/KvPageScanner.java | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/hugegraph-server/hugegraph-hstore/src/main/java/org/apache/hugegraph/backend/store/hstore/HstoreSessionsImpl.java b/hugegraph-server/hugegraph-hstore/src/main/java/org/apache/hugegraph/backend/store/hstore/HstoreSessionsImpl.java index 60cf48891d..27de0e029b 100755 --- a/hugegraph-server/hugegraph-hstore/src/main/java/org/apache/hugegraph/backend/store/hstore/HstoreSessionsImpl.java +++ b/hugegraph-server/hugegraph-hstore/src/main/java/org/apache/hugegraph/backend/store/hstore/HstoreSessionsImpl.java @@ -247,7 +247,7 @@ public ColumnIterator(String table, T results, byte[] keyBegin, this.gotNext = false; // QUESTION: Resetting the position may result in the caller being unable to // retrieve the corresponding position. - this.position = null; + // this.position = null; } if (!ArrayUtils.isEmpty(this.keyBegin) || !ArrayUtils.isEmpty(this.keyEnd)) { @@ -320,7 +320,7 @@ public boolean hasNext() { } else { // QUESTION: Resetting the position may result in the caller being unable to // retrieve the corresponding position. -// this.position = null; + // this.position = null; } return gotNext; } @@ -741,7 +741,6 @@ public BackendColumnIterator scan(String table, byte[] ownerKeyFrom, public BackendColumnIterator scan(String table, int codeFrom, int codeTo, int scanType, byte[] query) { - // 可以把 table 过滤掉 assert !this.hasChanges(); HgKvIterator iterator = this.graph.scanIterator(table, codeFrom, codeTo, 256, diff --git a/hugegraph-store/hg-store-client/src/main/java/org/apache/hugegraph/store/client/grpc/KvPageScanner.java b/hugegraph-store/hg-store-client/src/main/java/org/apache/hugegraph/store/client/grpc/KvPageScanner.java index aeb9a1e9a9..0b7f277f3e 100644 --- a/hugegraph-store/hg-store-client/src/main/java/org/apache/hugegraph/store/client/grpc/KvPageScanner.java +++ b/hugegraph-store/hg-store-client/src/main/java/org/apache/hugegraph/store/client/grpc/KvPageScanner.java @@ -196,8 +196,8 @@ public boolean hasNext() { } // QUESTION: After `this.iterator.hasNext()` evaluates to false, // no further attempts are made to reconstruct the iterator. - if (this.iterator != null && this.iterator.hasNext()) { - return true; + if (this.iterator != null) { + return this.iterator.hasNext(); } long start = 0; boolean debugEnabled = log.isDebugEnabled(); From 8ad7d3bd3d3fc84cc252554c0aeb2854fe4ebbee Mon Sep 17 00:00:00 2001 From: Peng Junzhi <201250214@smail.nju.edu.cn> Date: Mon, 26 Feb 2024 01:11:51 +0800 Subject: [PATCH 10/15] try ci --- .../src/main/java/org/apache/hugegraph/core/BaseCoreTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java index b25bb0a9bb..a042533843 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java @@ -93,7 +93,7 @@ public void setup() { this.clearSchema(); // QUESTION: here we should consider to clear cache // but with this line of code, many ci will fail -// this.clearCache(); + // this.clearCache(); } @After From a8a146fd61f13bf1e322ab32f94f73d8ef36aa85 Mon Sep 17 00:00:00 2001 From: VGalaxies Date: Mon, 26 Feb 2024 12:33:54 +0800 Subject: [PATCH 11/15] chore: reset issues related to hstore data access --- .../hugegraph/backend/store/hstore/HstoreSessionsImpl.java | 4 ++-- .../apache/hugegraph/store/client/grpc/KvPageScanner.java | 6 +++--- pom.xml | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/hugegraph-server/hugegraph-hstore/src/main/java/org/apache/hugegraph/backend/store/hstore/HstoreSessionsImpl.java b/hugegraph-server/hugegraph-hstore/src/main/java/org/apache/hugegraph/backend/store/hstore/HstoreSessionsImpl.java index 27de0e029b..e091bc42f8 100755 --- a/hugegraph-server/hugegraph-hstore/src/main/java/org/apache/hugegraph/backend/store/hstore/HstoreSessionsImpl.java +++ b/hugegraph-server/hugegraph-hstore/src/main/java/org/apache/hugegraph/backend/store/hstore/HstoreSessionsImpl.java @@ -247,7 +247,7 @@ public ColumnIterator(String table, T results, byte[] keyBegin, this.gotNext = false; // QUESTION: Resetting the position may result in the caller being unable to // retrieve the corresponding position. - // this.position = null; + this.position = null; } if (!ArrayUtils.isEmpty(this.keyBegin) || !ArrayUtils.isEmpty(this.keyEnd)) { @@ -320,7 +320,7 @@ public boolean hasNext() { } else { // QUESTION: Resetting the position may result in the caller being unable to // retrieve the corresponding position. - // this.position = null; + this.position = null; } return gotNext; } diff --git a/hugegraph-store/hg-store-client/src/main/java/org/apache/hugegraph/store/client/grpc/KvPageScanner.java b/hugegraph-store/hg-store-client/src/main/java/org/apache/hugegraph/store/client/grpc/KvPageScanner.java index 0b7f277f3e..1f8956f6d5 100644 --- a/hugegraph-store/hg-store-client/src/main/java/org/apache/hugegraph/store/client/grpc/KvPageScanner.java +++ b/hugegraph-store/hg-store-client/src/main/java/org/apache/hugegraph/store/client/grpc/KvPageScanner.java @@ -195,9 +195,9 @@ public boolean hasNext() { return false; } // QUESTION: After `this.iterator.hasNext()` evaluates to false, - // no further attempts are made to reconstruct the iterator. - if (this.iterator != null) { - return this.iterator.hasNext(); + // no further attempts should make to reconstruct the iterator. + if (this.iterator != null && this.iterator.hasNext()) { + return true; } long start = 0; boolean debugEnabled = log.isDebugEnabled(); diff --git a/pom.xml b/pom.xml index b887e511e4..4f5baccf3c 100644 --- a/pom.xml +++ b/pom.xml @@ -181,7 +181,6 @@ **/hbase-*/** **/apache-cassandra-*/** **/pid - **/tmp/** **/src/main/java/org/apache/hugegraph/pd/grpc/** **/src/main/java/org/apache/hugegraph/store/grpc/** From f6771d85cdf303c3f1d84d65efa64fb61fbb73b0 Mon Sep 17 00:00:00 2001 From: VGalaxies Date: Mon, 26 Feb 2024 13:12:32 +0800 Subject: [PATCH 12/15] fix: SchemaJob ISchemaTransaction --- .../java/org/apache/hugegraph/job/schema/SchemaJob.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/SchemaJob.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/SchemaJob.java index ce399fe402..3165351396 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/SchemaJob.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/schema/SchemaJob.java @@ -23,7 +23,6 @@ import org.apache.hugegraph.backend.id.Id; import org.apache.hugegraph.backend.id.IdGenerator; import org.apache.hugegraph.backend.tx.ISchemaTransaction; -import org.apache.hugegraph.backend.tx.SchemaTransaction; import org.apache.hugegraph.job.SysJob; import org.apache.hugegraph.schema.SchemaElement; import org.apache.hugegraph.type.HugeType; @@ -89,7 +88,7 @@ public static String formatTaskName(HugeType type, Id id, String name) { protected static void removeSchema(ISchemaTransaction tx, SchemaElement schema) { try { - Method method = SchemaTransaction.class + Method method = ISchemaTransaction.class .getDeclaredMethod("removeSchema", SchemaElement.class); method.setAccessible(true); @@ -109,10 +108,10 @@ protected static void removeSchema(ISchemaTransaction tx, * @param tx The update operation actual execute * @param schema the schema to be updated */ - protected static void updateSchema(SchemaTransaction tx, + protected static void updateSchema(ISchemaTransaction tx, SchemaElement schema) { try { - Method method = SchemaTransaction.class + Method method = ISchemaTransaction.class .getDeclaredMethod("updateSchema", SchemaElement.class); method.setAccessible(true); From fb3bd87ff6b88d9ea2db7f7dc2e878e92e79ba51 Mon Sep 17 00:00:00 2001 From: Peng Junzhi <201250214@smail.nju.edu.cn> Date: Mon, 26 Feb 2024 15:40:29 +0800 Subject: [PATCH 13/15] clear cache --- .../src/main/java/org/apache/hugegraph/core/BaseCoreTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java index a042533843..494040ea4a 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java @@ -93,7 +93,7 @@ public void setup() { this.clearSchema(); // QUESTION: here we should consider to clear cache // but with this line of code, many ci will fail - // this.clearCache(); + this.clearCache(); } @After From ad5e00fc8a6098b0a446558a38a2f95d567aad7d Mon Sep 17 00:00:00 2001 From: Peng Junzhi <201250214@smail.nju.edu.cn> Date: Mon, 26 Feb 2024 23:01:34 +0800 Subject: [PATCH 14/15] skip tmp rat check --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index 4f5baccf3c..b887e511e4 100644 --- a/pom.xml +++ b/pom.xml @@ -181,6 +181,7 @@ **/hbase-*/** **/apache-cassandra-*/** **/pid + **/tmp/** **/src/main/java/org/apache/hugegraph/pd/grpc/** **/src/main/java/org/apache/hugegraph/store/grpc/** From 5cb20336013ac7d437fb0972510127c9e33dbb90 Mon Sep 17 00:00:00 2001 From: Peng Junzhi <201250214@smail.nju.edu.cn> Date: Tue, 27 Feb 2024 15:09:48 +0800 Subject: [PATCH 15/15] Revert "clear cache" This reverts commit fb3bd87ff6b88d9ea2db7f7dc2e878e92e79ba51. --- .../src/main/java/org/apache/hugegraph/core/BaseCoreTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java index 494040ea4a..a042533843 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/BaseCoreTest.java @@ -93,7 +93,7 @@ public void setup() { this.clearSchema(); // QUESTION: here we should consider to clear cache // but with this line of code, many ci will fail - this.clearCache(); + // this.clearCache(); } @After