yuqi1129 opened a new issue, #5361: URL: https://github.com/apache/gravitino/issues/5361
### What would you like to be improved? Currently, the catalog connection has no timeout, if the connection blocked for a long time, the whole Gravino sever will hang as the lock is unable to be released. Let's take an example: <img width="1549" alt="image" src="https://github.com/user-attachments/assets/66f81c3f-534a-4c6b-9f19-032df421ab35"> Then create a scheme and create a fileset under the schema:  Log in Gravitino server: ```text 2024-10-30 14:12:24.897 WARN [tree-lock-dead-lock-checker-0] [org.apache.gravitino.lock.LockManager.lambda$checkDeadLock$1(LockManager.java:138)] - Dead lock detected for thread with identifier ThreadIdentifier{thread=Thread[Gravitino-webserver-61,5,main], ident=s3_metalake.oss_catalog.schema} on node TreeLockNode{ident=s3_metalake,hashCode=2012488818}, threads that holding the node: {ThreadIdentifier{thread=Thread[Gravitino-webserver-51,5,main], ident=s3_metalake.oss_catalog.schema}=1730268637230, ThreadIdentifier{thread=Thread[Gravitino-webserver-62,5,main], ident=s3_metalake.oss_catalog.schema}=1730268671689, ThreadIdentifier{thread=Thread[Gravitino-webserver-65,5,main], ident=s3_metalake.oss_catalog.schema}=1730268638110, ThreadIdentifier{thread=Thread[Gravitino-webserver-61,5,main], ident=s3_metalake.oss_catalog.schema}=1730268653506} 2024-10-30 14:12:24.897 WARN [tree-lock-dead-lock-checker-0] [org.apache.gravitino.lock.LockManager.lambda$checkDeadLock$1(LockManager.java:138)] - Dead lock detected for thread with identifier ThreadIdentifier{thread=Thread[Gravitino-webserver-51,5,main], ident=s3_metalake.oss_catalog.schema} on node TreeLockNode{ident=/,hashCode=78}, threads that holding the node: {ThreadIdentifier{thread=Thread[Gravitino-webserver-51,5,main], ident=s3_metalake.oss_catalog.schema}=1730268637230, ThreadIdentifier{thread=Thread[Gravitino-webserver-62,5,main], ident=s3_metalake.oss_catalog.schema}=1730268671689, ThreadIdentifier{thread=Thread[Gravitino-webserver-65,5,main], ident=s3_metalake.oss_catalog.schema}=1730268638110, ThreadIdentifier{thread=Thread[Gravitino-webserver-61,5,main], ident=s3_metalake.oss_catalog.schema}=1730268653506} 2024-10-30 14:12:24.897 WARN [tree-lock-dead-lock-checker-0] [org.apache.gravitino.lock.LockManager.lambda$checkDeadLock$1(LockManager.java:138)] - Dead lock detected for thread with identifier ThreadIdentifier{thread=Thread[Gravitino-webserver-62,5,main], ident=s3_metalake.oss_catalog.schema} on node TreeLockNode{ident=/,hashCode=78}, threads that holding the node: {ThreadIdentifier{thread=Thread[Gravitino-webserver-51,5,main], ident=s3_metalake.oss_catalog.schema}=1730268637230, ThreadIdentifier{thread=Thread[Gravitino-webserver-62,5,main], ident=s3_metalake.oss_catalog.schema}=1730268671689, ThreadIdentifier{thread=Thread[Gravitino-webserver-65,5,main], ident=s3_metalake.oss_catalog.schema}=1730268638110, ThreadIdentifier{thread=Thread[Gravitino-webserver-61,5,main], ident=s3_metalake.oss_catalog.schema}=1730268653506} 2024-10-30 14:12:24.898 WARN [tree-lock-dead-lock-checker-0] [org.apache.gravitino.lock.LockManager.lambda$checkDeadLock$1(LockManager.java:138)] - Dead lock detected for thread with identifier ThreadIdentifier{thread=Thread[Gravitino-webserver-65,5,main], ident=s3_metalake.oss_catalog.schema} on node TreeLockNode{ident=/,hashCode=78}, threads that holding the node: {ThreadIdentifier{thread=Thread[Gravitino-webserver-51,5,main], ident=s3_metalake.oss_catalog.schema}=1730268637230, ThreadIdentifier{thread=Thread[Gravitino-webserver-62,5,main], ident=s3_metalake.oss_catalog.schema}=1730268671689, ThreadIdentifier{thread=Thread[Gravitino-webserver-65,5,main], ident=s3_metalake.oss_catalog.schema}=1730268638110, ThreadIdentifier{thread=Thread[Gravitino-webserver-61,5,main], ident=s3_metalake.oss_catalog.schema}=1730268653506} 2024-10-30 14:12:24.898 WARN [tree-lock-dead-lock-checker-0] [org.apache.gravitino.lock.LockManager.lambda$checkDeadLock$1(LockManager.java:138)] - Dead lock detected for thread with identifier ThreadIdentifier{thread=Thread[Gravitino-webserver-61,5,main], ident=s3_metalake.oss_catalog.schema} on node TreeLockNode{ident=/,hashCode=78}, threads that holding the node: {ThreadIdentifier{thread=Thread[Gravitino-webserver-51,5,main], ident=s3_metalake.oss_catalog.schema}=1730268637230, ThreadIdentifier{thread=Thread[Gravitino-webserver-62,5,main], ident=s3_metalake.oss_catalog.schema}=1730268671689, ThreadIdentifier{thread=Thread[Gravitino-webserver-65,5,main], ident=s3_metalake.oss_catalog.schema}=1730268638110, ThreadIdentifier{thread=Thread[Gravitino-webserver-61,5,main], ident=s3_metalake.oss_catalog.schema}=1730268653506} 2024-10-30 14:12:24.898 INFO [tree-lock-dead-lock-checker-0] [org.apache.gravitino.lock.LockManager.lambda$startDeadLockChecker$0(LockManager.java:116)] - Finish to check the dead lock... ``` I clicked the create fileset button several times and it seems that there is a deadlock here. ### How should we improve? _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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
