Skip to content

Commit 0d9a670

Browse files
committed
fix global sharing schemaCache into exclusive schemaGraph
1 parent b13c000 commit 0d9a670

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedSchemaTransactionV2.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public void close() {
8787
private Cache<Id, Object> cache(String prefix, long capacity) {
8888
// TODO: uncomment later - graph space
8989
//final String name = prefix + "-" + this.graph().spaceGraphName();
90-
final String name = prefix + "-" + "";
90+
final String name = prefix + "-" + this.graphName();
9191
// NOTE: must disable schema cache-expire due to getAllSchema()
9292
return CacheManager.instance().cache(name, capacity);
9393
}

hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/MultiGraphsTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ public void testCopySchemaWithMultiGraphsWithConflict() {
211211
g1.serverStarted(GlobalMasterInfo.master("server-g1c"));
212212
g2.serverStarted(GlobalMasterInfo.master("server-g2c"));
213213

214-
g1.schema().propertyKey("id").asInt().create();
215-
g2.schema().propertyKey("id").asText().create();
214+
g1.schema().propertyKey("id").asInt().checkExist(false).create();
215+
g2.schema().propertyKey("id").asText().checkExist(false).create();
216216

217217
Assert.assertThrows(ExistedException.class, () -> {
218218
g2.schema().copyFrom(g1.schema());

0 commit comments

Comments
 (0)