You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hugegraph.apache.org by "zyxxoo (via GitHub)" <gi...@apache.org> on 2023/12/08 07:01:02 UTC

[PR] fix: tinkerpop unit test [incubator-hugegraph]

zyxxoo opened a new pull request, #2381:
URL: https://github.com/apache/incubator-hugegraph/pull/2381

   (no comment)


-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix: tinkerpop unit test [incubator-hugegraph]

Posted by "javeme (via GitHub)" <gi...@apache.org>.
javeme commented on PR #2381:
URL: https://github.com/apache/incubator-hugegraph/pull/2381#issuecomment-1855834331

   I can't run the core test and tinkerpop test locally(unit test is ok), since [this commit](https://github.com/apache/incubator-hugegraph/commit/bce6d058f5d1f108b4c19e18eb7a65ab0604a526) was introduced:
   `java.lang.NoClassDefFoundError: org/junit/runner/manipulation/Filter`


-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix: tinkerpop unit test [incubator-hugegraph]

Posted by "zyxxoo (via GitHub)" <gi...@apache.org>.
zyxxoo commented on PR #2381:
URL: https://github.com/apache/incubator-hugegraph/pull/2381#issuecomment-1858681244

   > > CommunityGeneratorTest
   > 
   > 我本地尝试将 WAL_PATH, DATA_PATH 按graph 分开,单测就跑过了**一部分**, 后面仍有类似的问题 ![Screenshot2023_12_14_184756](https://private-user-images.githubusercontent.com/11863049/290493179-c441764e-6449-45a2-a5d1-c7cbd7c0ebf5.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTEiLCJleHAiOjE3MDI2OTI4NTgsIm5iZiI6MTcwMjY5MjU1OCwicGF0aCI6Ii8xMTg2MzA0OS8yOTA0OTMxNzktYzQ0MTc2NGUtNjQ0OS00NWEyLWE1ZDEtYzdjYmQ3YzBlYmY1LmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFJV05KWUFYNENTVkVINTNBJTJGMjAyMzEyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjMxMjE2VDAyMDkxOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJjMjNjY2YyMDJhN2Y2OTMyOTQyNDkzNDY4MDY5MThiNzNmZTZmODBiMjM3YjEzYTgyODQyOTBkY2ZmODA1ODUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.KozxqICaTdbikIEOWRC8ZzYLnqR22xglkmOOPqDTzh4)
   
   我尝试在 graph close 的时候,强制关闭 rocksdb 实例,这样似乎一类单测问题就通过了,但是考虑一类场景,如果进程意外挂了,graph 没 close,因为文件锁的存在,似乎下次就无法打开了。。这种会有吗?大佬们觉得如何解决比较合适呢?文件锁直接删了?


-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix: tinkerpop unit test [incubator-hugegraph]

Posted by "zyxxoo (via GitHub)" <gi...@apache.org>.
zyxxoo commented on PR #2381:
URL: https://github.com/apache/incubator-hugegraph/pull/2381#issuecomment-1853919522

   rocksdb 单测问题,看着是我们 rocksdb 不太稳定
   Caused by: org.apache.hugegraph.exception.ConnectionException: Failed to open RocksDB 'rocksdb-data/m'
   Caused by: org.rocksdb.RocksDBException: lock hold by current process, acquire time 1702457768 acquiring thread 140088626837248: rocksdb-data/m/LOCK: No locks available


-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix: tinkerpop unit test [incubator-hugegraph]

Posted by "zyxxoo (via GitHub)" <gi...@apache.org>.
zyxxoo commented on PR #2381:
URL: https://github.com/apache/incubator-hugegraph/pull/2381#issuecomment-1855617019

   > CommunityGeneratorTest
   
   我本地尝试将 WAL_PATH, DATA_PATH 按graph 分开,单测就跑过了
   ![Screenshot2023_12_14_184756](https://github.com/apache/incubator-hugegraph/assets/11863049/c441764e-6449-45a2-a5d1-c7cbd7c0ebf5)
   


-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix: tinkerpop unit test [incubator-hugegraph]

Posted by "zyxxoo (via GitHub)" <gi...@apache.org>.
zyxxoo commented on code in PR #2381:
URL: https://github.com/apache/incubator-hugegraph/pull/2381#discussion_r1433807045


##########
hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStore.java:
##########
@@ -423,6 +423,16 @@ public void close() {
         this.closeSessions();
     }
 
+    public void forceClose() {
+        try {
+            this.checkOpened();
+            this.closeSessions();
+        } catch (Throwable ignore) {
+            return;
+        }
+        ((RocksDBStdSessions)this.sessions).forceClose();

Review Comment:
   yes, now, this way close the session first, last forceClose



-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix: tinkerpop unit test [incubator-hugegraph]

Posted by "zyxxoo (via GitHub)" <gi...@apache.org>.
zyxxoo commented on code in PR #2381:
URL: https://github.com/apache/incubator-hugegraph/pull/2381#discussion_r1433371206


##########
hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStore.java:
##########
@@ -414,6 +414,16 @@ public void close() {
         this.closeSessions();
     }
 
+    public void forceClose() {
+        try {
+            this.checkOpened();
+            this.closeSessions();
+        } catch (Throwable ignore) {
+            return;
+        }
+        ((RocksDBStdSessions)this.sessions).forceClose();

Review Comment:
   now, if  the rocksdb instance  be shard with other graph instance, the rocksdb will throw exception, now, different graph have different rocksdb instance



-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix: tinkerpop unit test [incubator-hugegraph]

Posted by "zyxxoo (via GitHub)" <gi...@apache.org>.
zyxxoo commented on PR #2381:
URL: https://github.com/apache/incubator-hugegraph/pull/2381#issuecomment-1855364923

   > > hbase 有一个单测试是这个问题,close 的时候,有事务没 close,这个貌似以前讨论过 Error: shouldPersistDataOnClose(org.apache.tinkerpop.gremlin.structure.GraphTest) Time elapsed: 2.942 s <<< ERROR! java.lang.IllegalStateException: Ensure tx closed in all threads when closing graph 'hugegraph_structure_standard' at org.apache.tinkerpop.gremlin.structure.GraphTest.shouldPersistDataOnClose(GraphTest.java:1241)
   > 
   > 我加了一点debug信息了,可以根据错误日志一起再看看问题
   
   debug 日志如下:看这些日志,close 抛异常,似乎是符合预期的
   Error: -14 07:21:46 [main] [ERROR] o.a.h.StandardHugeGraph - Tx '40' is not closed in thread
   java.lang.Exception: null
   	at org.apache.hugegraph.StandardHugeGraph$TinkerPopTransaction.setOpened(StandardHugeGraph.java:1457) ~[classes/:?]
   	at org.apache.hugegraph.StandardHugeGraph$TinkerPopTransaction.doOpen(StandardHugeGraph.java:1402) ~[classes/:?]
   	at org.apache.tinkerpop.gremlin.structure.util.AbstractTransaction.open(AbstractTransaction.java:95) ~[gremlin-core-3.5.1.jar:3.5.1]
   	at org.apache.tinkerpop.gremlin.structure.Transaction$READ_WRITE_BEHAVIOR$1.accept(Transaction.java:213) ~[gremlin-core-3.5.1.jar:3.5.1]
   	at org.apache.tinkerpop.gremlin.structure.Transaction$READ_WRITE_BEHAVIOR$1.accept(Transaction.java:210) ~[gremlin-core-3.5.1.jar:3.5.1]
   	at org.apache.tinkerpop.gremlin.structure.util.AbstractThreadLocalTransaction.doReadWrite(AbstractThreadLocalTransaction.java:92) ~[gremlin-core-3.5.1.jar:3.5.1]
   	at org.apache.tinkerpop.gremlin.structure.util.AbstractTransaction.readWrite(AbstractTransaction.java:136) ~[gremlin-core-3.5.1.jar:3.5.1]
   	at org.apache.hugegraph.StandardHugeGraph.graphTransaction(StandardHugeGraph.java:541) ~[classes/:?]
   	at org.apache.hugegraph.StandardHugeGraph.vertices(StandardHugeGraph.java:685) ~[classes/:?]
   	at org.apache.hugegraph.tinkerpop.TestGraph.vertices(TestGraph.java:215) ~[classes/:?]
   	at org.apache.tinkerpop.gremlin.structure.TransactionTest$3.run(TransactionTest.java:506) ~[gremlin-test-3.5.1.jar:3.5.1]
   Error: -14 07:21:46 [main] [ERROR] o.a.h.t.TestGraphProvider - Error while closing graph 'standardhugegraph[hugegraph_structure_g1]'
   java.lang.IllegalStateException: Ensure tx closed in all threads when closing graph 'hugegraph_structure_g1'
   	at com.google.common.base.Preconditions.checkState(Preconditions.java:532) ~[guava-30.0-jre.jar:?]
   	at org.apache.hugegraph.util.E.checkState(E.java:64) ~[hugegraph-common-1.2.0.jar:1.2.0]
   	at org.apache.hugegraph.StandardHugeGraph.close(StandardHugeGraph.java:985) ~[classes/:?]
   	at org.apache.hugegraph.tinkerpop.TestGraph.close(TestGraph.java:232) ~[classes/:?]
   	at org.apache.hugegraph.tinkerpop.TestGraphProvider.clear(TestGraphProvider.java:361) ~[classes/:?]
   	at org.apache.hugegraph.tinkerpop.StructureBasicSuite$1.evaluate(StructureBasicSuite.java:115) ~[classes/:?]
   	at org.apache.tinkerpop.gremlin.AbstractGremlinSuite$1.evaluate(AbstractGremlinSuite.java:235) ~[gremlin-test-3.5.1.jar:3.5.1]
   	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) ~[junit-4.13.1.jar:4.13.1]
   	at org.junit.runners.ParentRunner.run(ParentRunner.java:413) ~[junit-4.13.1.jar:4.13.1]
   	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365) ~[surefire-junit4-2.20.jar:2.20]
   	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:272) ~[surefire-junit4-2.20.jar:2.20]
   	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:236) ~[surefire-junit4-2.20.jar:2.20]
   	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159) ~[surefire-junit4-2.20.jar:2.20]
   	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:386) ~[surefire-booter-2.20.jar:2.20]
   	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:323) ~[surefire-booter-2.20.jar:2.20]
   	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:143) ~[surefire-booter-2.20.jar:2.20]
   2023-12-14 07:21:46 [main] [INFO] o.a.h.StandardHugeGraph - Close graph standardhugegraph[hugegraph_structure_standard]
   2023-12-14 07:21:46 [main] [INFO] o.a.h.t.ServerInfoManager - Remove server info: server-tinkerpop
   Error: -14 07:21:46 [main] [ERROR] o.a.h.StandardHugeGraph - Tx '48' is not closed in thread
   java.lang.Exception: null
   	at org.apache.hugegraph.StandardHugeGraph$TinkerPopTransaction.setOpened(StandardHugeGraph.java:1457) ~[classes/:?]
   	at org.apache.hugegraph.StandardHugeGraph$TinkerPopTransaction.doOpen(StandardHugeGraph.java:1402) ~[classes/:?]
   	at org.apache.tinkerpop.gremlin.structure.util.AbstractTransaction.open(AbstractTransaction.java:95) ~[gremlin-core-3.5.1.jar:3.5.1]
   	at org.apache.tinkerpop.gremlin.structure.Transaction$READ_WRITE_BEHAVIOR$1.accept(Transaction.java:213) ~[gremlin-core-3.5.1.jar:3.5.1]
   	at org.apache.tinkerpop.gremlin.structure.Transaction$READ_WRITE_BEHAVIOR$1.accept(Transaction.java:210) ~[gremlin-core-3.5.1.jar:3.5.1]
   	at org.apache.tinkerpop.gremlin.structure.util.AbstractThreadLocalTransaction.doReadWrite(AbstractThreadLocalTransaction.java:92) ~[gremlin-core-3.5.1.jar:3.5.1]
   	at org.apache.tinkerpop.gremlin.structure.util.AbstractTransaction.readWrite(AbstractTransaction.java:136) ~[gremlin-core-3.5.1.jar:3.5.1]
   	at org.apache.hugegraph.StandardHugeGraph.graphTransaction(StandardHugeGraph.java:541) ~[classes/:?]
   	at org.apache.hugegraph.StandardHugeGraph.vertices(StandardHugeGraph.java:685) ~[classes/:?]
   	at org.apache.hugegraph.tinkerpop.TestGraph.vertices(TestGraph.java:215) ~[classes/:?]
   	at org.apache.tinkerpop.gremlin.structure.TransactionTest$4.run(TransactionTest.java:545) ~[gremlin-test-3.5.1.jar:3.5.1]
   Error: -14 07:21:46 [main] [ERROR] o.a.h.StandardHugeGraph - Tx '40' is not closed in thread
   java.lang.Exception: null
   	at org.apache.hugegraph.StandardHugeGraph$TinkerPopTransaction.setOpened(StandardHugeGraph.java:1457) ~[classes/:?]
   	at org.apache.hugegraph.StandardHugeGraph$TinkerPopTransaction.doOpen(StandardHugeGraph.java:1402) ~[classes/:?]
   	at org.apache.tinkerpop.gremlin.structure.util.AbstractTransaction.open(AbstractTransaction.java:95) ~[gremlin-core-3.5.1.jar:3.5.1]
   	at org.apache.tinkerpop.gremlin.structure.Transaction$READ_WRITE_BEHAVIOR$1.accept(Transaction.java:213) ~[gremlin-core-3.5.1.jar:3.5.1]
   	at org.apache.tinkerpop.gremlin.structure.Transaction$READ_WRITE_BEHAVIOR$1.accept(Transaction.java:210) ~[gremlin-core-3.5.1.jar:3.5.1]
   	at org.apache.tinkerpop.gremlin.structure.util.AbstractThreadLocalTransaction.doReadWrite(AbstractThreadLocalTransaction.java:92) ~[gremlin-core-3.5.1.jar:3.5.1]
   	at org.apache.tinkerpop.gremlin.structure.util.AbstractTransaction.readWrite(AbstractTransaction.java:136) ~[gremlin-core-3.5.1.jar:3.5.1]
   	at org.apache.hugegraph.StandardHugeGraph.graphTransaction(StandardHugeGraph.java:541) ~[classes/:?]
   	at org.apache.hugegraph.StandardHugeGraph.vertices(StandardHugeGraph.java:685) ~[classes/:?]
   	at org.apache.hugegraph.tinkerpop.TestGraph.vertices(TestGraph.java:215) ~[classes/:?]
   	at org.apache.tinkerpop.gremlin.structure.TransactionTest$3.run(TransactionTest.java:503) ~[gremlin-test-3.5.1.jar:3.5.1]
   Error: -14 07:21:46 [main] [ERROR] o.a.h.StandardHugeGraph - Tx '51' is not closed in thread
   java.lang.Exception: null
   	at org.apache.hugegraph.StandardHugeGraph$TinkerPopTransaction.setOpened(StandardHugeGraph.java:1457) ~[classes/:?]
   	at org.apache.hugegraph.StandardHugeGraph$TinkerPopTransaction.doOpen(StandardHugeGraph.java:1402) ~[classes/:?]
   	at org.apache.tinkerpop.gremlin.structure.util.AbstractTransaction.open(AbstractTransaction.java:95) ~[gremlin-core-3.5.1.jar:3.5.1]
   	at org.apache.tinkerpop.gremlin.structure.TransactionTest.lambda$shouldAllowReferenceOfVertexIdOutsideOfOriginalThreadManual$10(TransactionTest.java:827) ~[gremlin-test-3.5.1.jar:3.5.1]
   	at java.lang.Thread.run(Thread.java:750) [?:1.8.0_392]
   Error: -14 07:21:46 [main] [ERROR] o.a.h.StandardHugeGraph - Tx '43' is not closed in thread
   java.lang.Exception: null
   	at org.apache.hugegraph.StandardHugeGraph$TinkerPopTransaction.setOpened(StandardHugeGraph.java:1457) ~[classes/:?]
   	at org.apache.hugegraph.StandardHugeGraph$TinkerPopTransaction.doOpen(StandardHugeGraph.java:1402) ~[classes/:?]
   	at org.apache.tinkerpop.gremlin.structure.util.AbstractTransaction.open(AbstractTransaction.java:95) ~[gremlin-core-3.5.1.jar:3.5.1]
   	at org.apache.tinkerpop.gremlin.structure.TransactionTest.lambda$shouldAllowReferenceOfEdgeIdOutsideOfOriginalThreadManual$11(TransactionTest.java:850) ~[gremlin-test-3.5.1.jar:3.5.1]
   	at java.lang.Thread.run(Thread.java:750) [?:1.8.0_392]
   Error: -14 07:21:46 [main] [ERROR] o.a.h.t.TestGraphProvider - Error while closing graph 'standardhugegraph[hugegraph_structure_standard]'
   java.lang.IllegalStateException: Ensure tx closed in all threads when closing graph 'hugegraph_structure_standard'
   	at com.google.common.base.Preconditions.checkState(Preconditions.java:532) ~[guava-30.0-jre.jar:?]
   	at org.apache.hugegraph.util.E.checkState(E.java:64) ~[hugegraph-common-1.2.0.jar:1.2.0]
   	at org.apache.hugegraph.StandardHugeGraph.close(StandardHugeGraph.java:985) ~[classes/:?]
   	at org.apache.hugegraph.tinkerpop.TestGraph.close(TestGraph.java:232) ~[classes/:?]
   	at org.apache.hugegraph.tinkerpop.TestGraphProvider.clear(TestGraphProvider.java:361) ~[classes/:?]
   	at org.apache.hugegraph.tinkerpop.StructureBasicSuite$1.evaluate(StructureBasicSuite.java:115) ~[classes/:?]
   	at org.apache.tinkerpop.gremlin.AbstractGremlinSuite$1.evaluate(AbstractGremlinSuite.java:235) ~[gremlin-test-3.5.1.jar:3.5.1]
   	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) ~[junit-4.13.1.jar:4.13.1]
   	at org.junit.runners.ParentRunner.run(ParentRunner.java:413) ~[junit-4.13.1.jar:4.13.1]
   	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365) ~[surefire-junit4-2.20.jar:2.20]
   	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:272) ~[surefire-junit4-2.20.jar:2.20]
   	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:236) ~[surefire-junit4-2.20.jar:2.20]
   	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159) ~[surefire-junit4-2.20.jar:2.20]
   	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:386) ~[surefire-booter-2.20.jar:2.20]
   	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:323) ~[surefire-booter-2.20.jar:2.20]
   	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:143) ~[surefire-booter-2.20.jar:2.20]


-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix: tinkerpop unit test [incubator-hugegraph]

Posted by "javeme (via GitHub)" <gi...@apache.org>.
javeme commented on code in PR #2381:
URL: https://github.com/apache/incubator-hugegraph/pull/2381#discussion_r1428804501


##########
hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/StandardHugeGraph.java:
##########
@@ -971,8 +971,8 @@ public synchronized void close() throws Exception {
             this.closeTx();
         } finally {
             this.closed = true;
-            this.storeProvider.close();
             LockUtil.destroy(this.name);
+            this.storeProvider.close();

Review Comment:
   keep LockUtil.destroy called at the end



##########
hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStoreProvider.java:
##########
@@ -68,6 +73,29 @@ protected BackendStore newSystemStore(HugeConfig config, String store) {
         return new RocksDBStore.RocksDBSystemStore(this, this.database(), store);
     }
 
+    @Override
+    public void close() throws BackendException {
+        super.close();
+        if (this.stores == null) {
+            return;
+        }
+        this.stores.values().forEach(store -> {
+            try {
+                if (!store.opened()) {
+                    return;
+                }
+            } catch (Throwable ignore) {
+                return;
+            }
+            try {
+                ((RocksDBStore)store).forceClose();

Review Comment:
   expect a space before store



##########
hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStore.java:
##########
@@ -414,6 +414,16 @@ public void close() {
         this.closeSessions();
     }
 
+    public void forceClose() {
+        try {
+            this.checkOpened();
+            this.closeSessions();
+        } catch (Throwable ignore) {
+            return;
+        }
+        ((RocksDBStdSessions)this.sessions).forceClose();

Review Comment:
   may the rocksdb instance be shared by other graph instance



##########
hugegraph-server/hugegraph-test/src/main/resources/methods.filter:
##########
@@ -94,6 +94,7 @@ org.apache.tinkerpop.gremlin.structure.util.reference.ReferenceEdgeTest.shouldCo
 # unsupported automatic edge id, therefore number of edge is wrong
 org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.EventStrategyProcessTest.shouldTriggerAddEdge: Unsupported automatic edge id, therefore number of edge is wrong
 org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.EventStrategyProcessTest.shouldTriggerAddEdgeByPath: Unsupported automatic edge id, therefore number of edge is wrong
+org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.EventStrategyProcessTest.shouldTriggerAddVertexWithPropertyThenPropertyAdded: Ignore

Review Comment:
   can we add some comments for why



-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix: tinkerpop unit test [incubator-hugegraph]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #2381:
URL: https://github.com/apache/incubator-hugegraph/pull/2381#issuecomment-1904813197

   Due to the lack of activity, the current pr is marked as stale and will be closed after 180 days, any update will remove the stale label


-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix: tinkerpop unit test [incubator-hugegraph]

Posted by "zyxxoo (via GitHub)" <gi...@apache.org>.
zyxxoo commented on PR #2381:
URL: https://github.com/apache/incubator-hugegraph/pull/2381#issuecomment-1853926285

   hbase 有一个单测试是这个问题,close 的时候,有事务没 close,这个貌似以前讨论过
   Error:  shouldPersistDataOnClose(org.apache.tinkerpop.gremlin.structure.GraphTest)  Time elapsed: 2.942 s  <<< ERROR!
   java.lang.IllegalStateException: Ensure tx closed in all threads when closing graph 'hugegraph_structure_standard'
   	at org.apache.tinkerpop.gremlin.structure.GraphTest.shouldPersistDataOnClose(GraphTest.java:1241)


-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix: tinkerpop unit test [incubator-hugegraph]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on PR #2381:
URL: https://github.com/apache/incubator-hugegraph/pull/2381#issuecomment-1855575777

   > rocksdb 单测问题,看着是我们 rocksdb 不太稳定 Caused by: org.apache.hugegraph.exception.ConnectionException: Failed to open RocksDB 'rocksdb-data/m' Caused by: org.rocksdb.RocksDBException: lock hold by current process, acquire time 1702457768 acquiring thread 140088626837248: rocksdb-data/m/LOCK: No locks available
   
   could be reproduced in local env: (with same problem)
   <img width="1447" alt="image" src="https://github.com/apache/incubator-hugegraph/assets/17706099/b3fa797b-51c8-4050-8dab-d10d220bac64">
   


-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix: tinkerpop unit test [incubator-hugegraph]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #2381:
URL: https://github.com/apache/incubator-hugegraph/pull/2381#issuecomment-1960310332

   Due to the lack of activity, the current pr is marked as stale and will be closed after 180 days, any update will remove the stale label


-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix: tinkerpop unit test [incubator-hugegraph]

Posted by "zyxxoo (via GitHub)" <gi...@apache.org>.
zyxxoo commented on PR #2381:
URL: https://github.com/apache/incubator-hugegraph/pull/2381#issuecomment-1855483931

   > shouldPersistDataOnClose
   
   也就 CommunityGeneratorTest 这个测试,把这个注释了,其他的貌似就能正常跑了
   


-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix: tinkerpop unit test [incubator-hugegraph]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #2381:
URL: https://github.com/apache/incubator-hugegraph/pull/2381#issuecomment-1846665350

   ## [Codecov](https://app.codecov.io/gh/apache/incubator-hugegraph/pull/2381?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   All modified and coverable lines are covered by tests :white_check_mark:
   > Comparison is base [(`ed493f3`)](https://app.codecov.io/gh/apache/incubator-hugegraph/commit/ed493f3093eab293a75cd2f539e29ca11fa6cd81?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 66.26% compared to head [(`60cfcb2`)](https://app.codecov.io/gh/apache/incubator-hugegraph/pull/2381?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 48.90%.
   > Report is 3 commits behind head on master.
   
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@              Coverage Diff              @@
   ##             master    #2381       +/-   ##
   =============================================
   - Coverage     66.26%   48.90%   -17.37%     
   + Complexity      830      272      -558     
   =============================================
     Files           509      510        +1     
     Lines         42106    42187       +81     
     Branches       5833     5840        +7     
   =============================================
   - Hits          27903    20630     -7273     
   - Misses        11450    19230     +7780     
   + Partials       2753     2327      -426     
   ```
   
   
   
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/incubator-hugegraph/pull/2381?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   


-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix: tinkerpop unit test [incubator-hugegraph]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on PR #2381:
URL: https://github.com/apache/incubator-hugegraph/pull/2381#issuecomment-1852161690

   Currently only 1 failed test found:
   ```java
   Error:  Failures: 
   Error:    EventStrategyProcessTest.shouldTriggerAddVertexWithPropertyThenPropertyAdded:215 expected:<1> but was:<0>
   
   shouldTriggerAddVertexWithPropertyThenPropertyAdded(org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.EventStrategyProcessTest)  Time elapsed: 1.461 s  <<< FAILURE!
   java.lang.AssertionError: expected:<1> but was:<0>
   	at org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.EventStrategyProcessTest.shouldTriggerAddVertexWithPropertyThenPropertyAdded(EventStrategyProcessTest.java:215)
   ```
   
   <img width="1151" alt="image" src="https://github.com/apache/incubator-hugegraph/assets/17706099/94cde055-c28e-4ce7-8c44-d149ffa2286a">
   


-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix: tinkerpop unit test [incubator-hugegraph]

Posted by "javeme (via GitHub)" <gi...@apache.org>.
javeme commented on code in PR #2381:
URL: https://github.com/apache/incubator-hugegraph/pull/2381#discussion_r1435638764


##########
hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStore.java:
##########
@@ -423,6 +423,16 @@ public void close() {
         this.closeSessions();
     }
 
+    public void forceClose() {
+        try {
+            this.checkOpened();
+            this.closeSessions();
+        } catch (Throwable ignore) {
+            return;
+        }
+        ((RocksDBStdSessions)this.sessions).forceClose();

Review Comment:
   note also need to iterate this.sessions() and forceClose every session.



-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix: tinkerpop unit test [incubator-hugegraph]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on PR #2381:
URL: https://github.com/apache/incubator-hugegraph/pull/2381#issuecomment-1857166603

   > I can't run the core test and tinkerpop test locally(unit test is ok), since [this commit](https://github.com/apache/incubator-hugegraph/commit/bce6d058f5d1f108b4c19e18eb7a65ab0604a526) was introduced: `java.lang.NoClassDefFoundError: org/junit/runner/manipulation/Filter`
   
   That PR only added a layer of directory structure without making any code level changes, should it be a problem of **relative/abs path** or **environment variable** changes? 
   
   How does the TP test run in Eclipse? (maybe need update the **working space**?)


-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix: tinkerpop unit test [incubator-hugegraph]

Posted by "zyxxoo (via GitHub)" <gi...@apache.org>.
zyxxoo commented on PR #2381:
URL: https://github.com/apache/incubator-hugegraph/pull/2381#issuecomment-1855086442

   > hbase 有一个单测试是这个问题,close 的时候,有事务没 close,这个貌似以前讨论过 Error: shouldPersistDataOnClose(org.apache.tinkerpop.gremlin.structure.GraphTest) Time elapsed: 2.942 s <<< ERROR! java.lang.IllegalStateException: Ensure tx closed in all threads when closing graph 'hugegraph_structure_standard' at org.apache.tinkerpop.gremlin.structure.GraphTest.shouldPersistDataOnClose(GraphTest.java:1241)
   
   我加了一点debug信息了,可以根据错误日志一起再看看问题 


-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix: tinkerpop unit test [incubator-hugegraph]

Posted by "zyxxoo (via GitHub)" <gi...@apache.org>.
zyxxoo commented on PR #2381:
URL: https://github.com/apache/incubator-hugegraph/pull/2381#issuecomment-1867310652

    @Test
       public void testOpenGraph() throws Exception {
           List<HugeGraph> graphs = openGraphs("test_g1");
           final HugeGraph graph = graphs.get(0);
           graph.initBackend();
           CountDownLatch count = new CountDownLatch(1);
           new Thread(()-> {
               graph.vertices();
               graph.tx().rollback();
               count.countDown();
           }).start();
   
           count.await();
           graph.close();
           graphs = openGraphs("test_g1");
           HugeGraph graph1 = graphs.get(0);
           graph1.initBackend();
           graph1.vertices();
       }
   
   这个单测可以复线rocksdb 打开的错误,在 setClose 的时候 ref==0 就destoryTransaction 或者 graph.close 的时候或者 forceClose,可以通过
       
       


-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix: tinkerpop unit test [incubator-hugegraph]

Posted by "javeme (via GitHub)" <gi...@apache.org>.
javeme commented on code in PR #2381:
URL: https://github.com/apache/incubator-hugegraph/pull/2381#discussion_r1433646528


##########
hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/StandardHugeGraph.java:
##########
@@ -1331,6 +1332,11 @@ public TinkerPopTransaction(Graph graph) {
             this.transactions = ThreadLocal.withInitial(() -> null);
         }
 
+        public String txThreadKey() {

Review Comment:
   unused code?



##########
hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStore.java:
##########
@@ -423,6 +423,16 @@ public void close() {
         this.closeSessions();
     }
 
+    public void forceClose() {
+        try {
+            this.checkOpened();
+            this.closeSessions();
+        } catch (Throwable ignore) {
+            return;
+        }
+        ((RocksDBStdSessions)this.sessions).forceClose();

Review Comment:
   ok.
   but we still need to iterate this.sessions() and close every session.



##########
hugegraph-server/hugegraph-test/src/main/resources/methods.filter:
##########
@@ -94,6 +94,7 @@ org.apache.tinkerpop.gremlin.structure.util.reference.ReferenceEdgeTest.shouldCo
 # unsupported automatic edge id, therefore number of edge is wrong
 org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.EventStrategyProcessTest.shouldTriggerAddEdge: Unsupported automatic edge id, therefore number of edge is wrong
 org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.EventStrategyProcessTest.shouldTriggerAddEdgeByPath: Unsupported automatic edge id, therefore number of edge is wrong
+org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.EventStrategyProcessTest.shouldTriggerAddVertexWithPropertyThenPropertyAdded: Ignore

Review Comment:
   can we add some comments like this:
   `# unsupported automatic edge id, therefore number of edge is wrong`



-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org