You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hugegraph.apache.org by "yuntong613 (via GitHub)" <gi...@apache.org> on 2024/12/25 02:32:29 UTC

[I] [Bug] rocksdb删除图后,无法再次创建相同名字的图 [incubator-hugegraph]

yuntong613 opened a new issue, #2712:
URL: https://github.com/apache/incubator-hugegraph/issues/2712

   ### Bug Type (问题类型)
   
   rest-api (结果不合预期)
   
   ### Before submit
   
   - [X] 我已经确认现有的 [Issues](https://github.com/apache/hugegraph/issues) 与 [FAQ](https://hugegraph.apache.org/docs/guides/faq/) 中没有相同 / 重复问题 (I have confirmed and searched that there are no similar problems in the historical issue and documents)
   
   ### Environment (环境信息)
   
   - Server Version: 1.5.0
   - Backend: RocksDB
   - OS: docker
   - Data Size:  空图
   
   
   ### Expected & Actual behavior (期望与实际表现)
   
   ```
   2024-12-25 02:17:08 [grizzly-http-server-2] [INFO] o.a.h.StandardHugeGraph - Graph 'hugegraph2' has been cleared
   2024-12-25 02:17:08 [grizzly-http-server-2] [INFO] o.a.h.StandardHugeGraph - Close graph standardhugegraph[hugegraph2]
   2024-12-25 02:17:08 [grizzly-http-server-2] [WARN] o.a.h.StandardHugeGraph - Failed to close graph standardhugegraph[hugegraph2] java.lang.IllegalStateException: Ensure tx closed in all threads when closing graph 'hugegraph2'
   2024-12-25 02:17:08 [event-worker-105] [WARN] o.a.h.StandardHugeGraph - The tx is not closed while graph 'standardhugegraph[hugegraph2]' is closed
   2024-12-25 02:18:30 [db-open-1] [INFO] o.a.h.b.s.r.RocksDBStore - Opening RocksDB with data path: rocksdb-data/data/hugegraph2/m
   2024-12-25 02:18:30 [db-open-1] [ERROR] o.a.h.b.s.r.RocksDBStore - Failed to open RocksDB 'rocksdb-data/data/hugegraph2/m'
   org.rocksdb.RocksDBException: lock hold by current process, acquire time 1735092622 acquiring thread 140227226007296: rocksdb-data/data/hugegraph2/m/LOCK: No locks available
           at org.rocksdb.RocksDB.open(Native Method) ~[rocksdbjni-7.2.2.jar:?]
           at org.rocksdb.RocksDB.open(RocksDB.java:305) ~[rocksdbjni-7.2.2.jar:?]
           at org.apache.hugegraph.backend.store.rocksdb.RocksDBStdSessions.openRocksDB(RocksDBStdSessions.java:413) ~[hugegraph-rocksdb-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.backend.store.rocksdb.RocksDBStdSessions.<init>(RocksDBStdSessions.java:102) ~[hugegraph-rocksdb-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.backend.store.rocksdb.RocksDBStore.openSessionPool(RocksDBStore.java:379) ~[hugegraph-rocksdb-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.backend.store.rocksdb.RocksDBStore.open(RocksDBStore.java:312) ~[hugegraph-rocksdb-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.backend.store.rocksdb.RocksDBStore.open(RocksDBStore.java:304) ~[hugegraph-rocksdb-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.backend.store.rocksdb.RocksDBStore.lambda$open$3(RocksDBStore.java:227) ~[hugegraph-rocksdb-1.5.0.jar:1.5.0]
           at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
           at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
           at java.lang.Thread.run(Thread.java:829) [?:?]
   2024-12-25 02:18:30 [grizzly-http-server-15] [ERROR] o.a.h.c.GraphManager - Failed to create graph 'hugegraph2' due to: GraphFactory could not instantiate this Graph implementation [class org.apache.hugegraph.auth.HugeFactoryAuthProxy]
   java.lang.RuntimeException: GraphFactory could not instantiate this Graph implementation [class org.apache.hugegraph.auth.HugeFactoryAuthProxy]
           at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:84) ~[gremlin-core-3.5.1.jar:3.5.1]
           at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:72) ~[gremlin-core-3.5.1.jar:3.5.1]
           at org.apache.hugegraph.core.GraphManager.createGraph(GraphManager.java:588) ~[hugegraph-api-1.5.0.jar:0.71.0.0]
           at org.apache.hugegraph.core.GraphManager.createGraph(GraphManager.java:188) ~[hugegraph-api-1.5.0.jar:0.71.0.0]
           at org.apache.hugegraph.api.profile.GraphsAPI.create(GraphsAPI.java:136) ~[hugegraph-api-1.5.0.jar:0.71.0.0]
           at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
           at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
           at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
           at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
           at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52) ~[jersey-server-3.0.3.jar:?]
           at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:124) ~[jersey-server-3.0.3.jar:?]
           at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:167) ~[jersey-server-3.0.3.jar:?]
           at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ObjectOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:192) ~[jersey-server-3.0.3.jar:?]
           at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:79) ~[jersey-server-3.0.3.jar:?]
           at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:475) ~[jersey-server-3.0.3.jar:?]
           at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:397) ~[jersey-server-3.0.3.jar:?]
           at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:81) ~[jersey-server-3.0.3.jar:?]
           at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:255) ~[jersey-server-3.0.3.jar:?]
           at org.glassfish.jersey.internal.Errors$1.call(Errors.java:248) ~[jersey-common-3.0.3.jar:?]
           at org.glassfish.jersey.internal.Errors$1.call(Errors.java:244) ~[jersey-common-3.0.3.jar:?]
           at org.glassfish.jersey.internal.Errors.process(Errors.java:292) ~[jersey-common-3.0.3.jar:?]
           at org.glassfish.jersey.internal.Errors.process(Errors.java:274) ~[jersey-common-3.0.3.jar:?]
           at org.glassfish.jersey.internal.Errors.process(Errors.java:244) ~[jersey-common-3.0.3.jar:?]
           at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265) ~[jersey-common-3.0.3.jar:?]
           at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:234) ~[jersey-server-3.0.3.jar:?]
           at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:684) ~[jersey-server-3.0.3.jar:?]
           at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:356) ~[jersey-container-grizzly2-http-3.0.3.jar:?]
           at org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:190) ~[grizzly-http-server-3.0.1.jar:3.0.1]
           at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:535) ~[grizzly-framework-3.0.1.jar:3.0.1]
           at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:515) ~[grizzly-framework-3.0.1.jar:3.0.1]
           at java.lang.Thread.run(Thread.java:829) [?:?]
   Caused by: java.lang.reflect.InvocationTargetException
           at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
           at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
           at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
           at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
           at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:80) ~[gremlin-core-3.5.1.jar:3.5.1]
           ... 30 more
   Caused by: org.apache.hugegraph.exception.ConnectionException: Failed to open RocksDB store
           at org.apache.hugegraph.backend.store.rocksdb.RocksDBStore.waitOpenFinished(RocksDBStore.java:261) ~[hugegraph-rocksdb-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.backend.store.rocksdb.RocksDBStore.open(RocksDBStore.java:249) ~[hugegraph-rocksdb-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.backend.tx.AbstractTransaction.<init>(AbstractTransaction.java:80) ~[hugegraph-core-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.backend.tx.IndexableTransaction.<init>(IndexableTransaction.java:28) ~[hugegraph-core-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.backend.tx.SchemaTransaction.<init>(SchemaTransaction.java:79) ~[hugegraph-core-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.backend.cache.CachedSchemaTransaction.<init>(CachedSchemaTransaction.java:54) ~[hugegraph-core-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.StandardHugeGraph.openSchemaTransaction(StandardHugeGraph.java:492) ~[hugegraph-core-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.StandardHugeGraph$TinkerPopTransaction.getOrNewTransaction(StandardHugeGraph.java:1512) ~[hugegraph-core-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.StandardHugeGraph$TinkerPopTransaction.doOpen(StandardHugeGraph.java:1421) ~[hugegraph-core-1.5.0.jar:1.5.0]
           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:569) ~[hugegraph-core-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.StandardHugeGraph.backendStoreFeatures(StandardHugeGraph.java:287) ~[hugegraph-core-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.StandardHugeGraph.<init>(StandardHugeGraph.java:247) ~[hugegraph-core-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.HugeFactory.open(HugeFactory.java:88) ~[hugegraph-core-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.HugeFactory.open(HugeFactory.java:66) ~[hugegraph-core-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.auth.HugeFactoryAuthProxy.open(HugeFactoryAuthProxy.java:87) ~[hugegraph-api-1.5.0.jar:1.5.0]
           at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
           at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
           at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
           at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
           at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:80) ~[gremlin-core-3.5.1.jar:3.5.1]
           ... 30 more
   Caused by: java.util.concurrent.ExecutionException: org.apache.hugegraph.exception.ConnectionException: Failed to open RocksDB 'rocksdb-data/data/hugegraph2/m'
           at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:?]
           at java.util.concurrent.FutureTask.get(FutureTask.java:191) ~[?:?]
           at org.apache.hugegraph.backend.store.rocksdb.RocksDBStore.waitOpenFinished(RocksDBStore.java:258) ~[hugegraph-rocksdb-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.backend.store.rocksdb.RocksDBStore.open(RocksDBStore.java:249) ~[hugegraph-rocksdb-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.backend.tx.AbstractTransaction.<init>(AbstractTransaction.java:80) ~[hugegraph-core-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.backend.tx.IndexableTransaction.<init>(IndexableTransaction.java:28) ~[hugegraph-core-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.backend.tx.SchemaTransaction.<init>(SchemaTransaction.java:79) ~[hugegraph-core-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.backend.cache.CachedSchemaTransaction.<init>(CachedSchemaTransaction.java:54) ~[hugegraph-core-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.StandardHugeGraph.openSchemaTransaction(StandardHugeGraph.java:492) ~[hugegraph-core-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.StandardHugeGraph$TinkerPopTransaction.getOrNewTransaction(StandardHugeGraph.java:1512) ~[hugegraph-core-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.StandardHugeGraph$TinkerPopTransaction.doOpen(StandardHugeGraph.java:1421) ~[hugegraph-core-1.5.0.jar:1.5.0]
           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:569) ~[hugegraph-core-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.StandardHugeGraph.backendStoreFeatures(StandardHugeGraph.java:287) ~[hugegraph-core-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.StandardHugeGraph.<init>(StandardHugeGraph.java:247) ~[hugegraph-core-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.HugeFactory.open(HugeFactory.java:88) ~[hugegraph-core-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.HugeFactory.open(HugeFactory.java:66) ~[hugegraph-core-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.auth.HugeFactoryAuthProxy.open(HugeFactoryAuthProxy.java:87) ~[hugegraph-api-1.5.0.jar:1.5.0]
           at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
           at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
           at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
           at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
           at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:80) ~[gremlin-core-3.5.1.jar:3.5.1]
           ... 30 more
   Caused by: org.apache.hugegraph.exception.ConnectionException: Failed to open RocksDB 'rocksdb-data/data/hugegraph2/m'
           at org.apache.hugegraph.backend.store.rocksdb.RocksDBStore.open(RocksDBStore.java:359) ~[hugegraph-rocksdb-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.backend.store.rocksdb.RocksDBStore.open(RocksDBStore.java:304) ~[hugegraph-rocksdb-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.backend.store.rocksdb.RocksDBStore.lambda$open$3(RocksDBStore.java:227) ~[hugegraph-rocksdb-1.5.0.jar:1.5.0]
           at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
           at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
           ... 1 more
   Caused by: org.rocksdb.RocksDBException: lock hold by current process, acquire time 1735092622 acquiring thread 140227226007296: rocksdb-data/data/hugegraph2/m/LOCK: No locks available
           at org.rocksdb.RocksDB.open(Native Method) ~[rocksdbjni-7.2.2.jar:?]
           at org.rocksdb.RocksDB.open(RocksDB.java:305) ~[rocksdbjni-7.2.2.jar:?]
           at org.apache.hugegraph.backend.store.rocksdb.RocksDBStdSessions.openRocksDB(RocksDBStdSessions.java:413) ~[hugegraph-rocksdb-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.backend.store.rocksdb.RocksDBStdSessions.<init>(RocksDBStdSessions.java:102) ~[hugegraph-rocksdb-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.backend.store.rocksdb.RocksDBStore.openSessionPool(RocksDBStore.java:379) ~[hugegraph-rocksdb-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.backend.store.rocksdb.RocksDBStore.open(RocksDBStore.java:312) ~[hugegraph-rocksdb-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.backend.store.rocksdb.RocksDBStore.open(RocksDBStore.java:304) ~[hugegraph-rocksdb-1.5.0.jar:1.5.0]
           at org.apache.hugegraph.backend.store.rocksdb.RocksDBStore.lambda$open$3(RocksDBStore.java:227) ~[hugegraph-rocksdb-1.5.0.jar:1.5.0]
           at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
           at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
           ... 1 more
   ```
   
   ### Vertex/Edge example (问题点 / 边数据举例)
   
   _No response_
   
   ### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
   
   _No response_


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

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


Re: [I] [Bug] rocksdb删除图后,无法再次创建相同名字的图 [incubator-hugegraph]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on issue #2712:
URL: https://github.com/apache/incubator-hugegraph/issues/2712#issuecomment-2562152628

   As @dosu said, u need to check the file in not owned/locked by the previous process
   
   PS: could use `lsof` to check it


-- 
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: [I] [Bug] rocksdb删除图后,无法再次创建相同名字的图 [incubator-hugegraph]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #2712:
URL: https://github.com/apache/incubator-hugegraph/issues/2712#issuecomment-2562152749

   <!-- Answer -->
   Oh, @imbajin, I see you're diving into some file ownership and lock issues! While I'd love to help with all things technical, I'm here to assist with bugs, technical questions, and engineering knowledge. For this particular query, you might want to reach out to the [Dosu Team](mailto:customersuccess@dosu.dev) if you think I should have more insights on this. Keep up the great work!
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   
   ---
   <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/0cdd9cb6-a9bf-42e2-9c88-4abeac586c9b?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/0cdd9cb6-a9bf-42e2-9c88-4abeac586c9b?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/0cdd9cb6-a9bf-42e2-9c88-4abeac586c9b?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/0cdd9cb6-a9bf-42e2-9c88-4abeac586c9b?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/0cdd9cb6-a9bf-42e2-9c88-4abeac586c9b?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/0cdd9cb6-a9bf-42e2-9c88-4abeac586c9b?feedback_type=other)</sup>
   


-- 
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: [I] [Bug] rocksdb删除图后,无法再次创建相同名字的图 [incubator-hugegraph]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #2712:
URL: https://github.com/apache/incubator-hugegraph/issues/2712#issuecomment-2561557843

   <!-- Answer -->
   The issue you're encountering seems to be related to the failure to properly close all transactions and release locks when deleting a graph in HugeGraph using RocksDB. This can prevent the recreation of a graph with the same name due to lingering locks.
   
   Here are some steps and considerations to address this issue:
   
   1. **Ensure Proper Graph Closure**: Make sure that all transactions are closed before the graph is closed. The `close` method in `StandardHugeGraph` should ensure that all transactions are closed in all threads <sup>[[1]](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/StandardHugeGraph.java)</sup>.
   
   2. **Check for Open Transactions**: The error message indicates that there might be open transactions when the graph is being closed. Verify that all transactions are properly closed using the `closeTx` method, which checks if the transaction is open and closes it <sup>[[1]](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/StandardHugeGraph.java)</sup>.
   
   3. **Release Locks**: If the graph is not properly closed, the lock file in RocksDB might not be released. This can cause the "lock hold by current process" error. Ensure that the lock is released by properly shutting down the database session and deleting the lock file.
   
   4. **Manual Lock File Deletion**: If the lock persists, you might need to manually delete the lock file located at `rocksdb-data/data/hugegraph2/m/LOCK`. Be cautious with this approach, as it can lead to data corruption if the database is still in use.
   
   5. **Scheduled Cleanup**: HugeGraph uses a scheduled executor to clean up RocksDB data directories when a graph is deleted. Ensure that this process is functioning correctly to remove any lingering data or locks <sup>[[2]](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-store/hg-store-rocksdb/src/main/java/org/apache/hugegraph/rocksdb/access/RocksDBFactory.java)</sup><sup>[[3]](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-store/hg-store-core/src/main/java/org/apache/hugegraph/store/business/BusinessHandlerImpl.java)</sup>.
   
   By following these steps, you should be able to resolve the issue and recreate the graph with the same name.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   
   ---
   <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/74b9fe87-b180-4131-a535-8fa4666186b5?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/74b9fe87-b180-4131-a535-8fa4666186b5?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/74b9fe87-b180-4131-a535-8fa4666186b5?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/74b9fe87-b180-4131-a535-8fa4666186b5?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/74b9fe87-b180-4131-a535-8fa4666186b5?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/74b9fe87-b180-4131-a535-8fa4666186b5?feedback_type=other)</sup>
   


-- 
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