CalvinKirs opened a new pull request, #39015:
URL: https://github.com/apache/doris/pull/39015

   
   ## Proposed changes
   
   ### Description:
   
   This issue proposes the addition of new features to the project, including a 
deadlock detection tool and monitored lock implementations. These features will 
help in identifying and debugging potential deadlocks and monitoring lock usage.
   Features:
   
   
   #### AbstractMonitoredLock:
   
   A monitored version of Lock that tracks and logs lock acquisition and 
release times.
   Functionality:
   Overrides lock(), unlock(), tryLock(), and tryLock(long timeout, TimeUnit 
unit) methods.
   Logs information about lock acquisition time, release time, and any failure 
to acquire the lock within the specified timeout.
   
   #### DeadlockCheckerTool:
   
   Uses ScheduledExecutorService for periodic deadlock checks.
   Logs deadlock information including thread names, states, lock info, and 
stack traces.
   
   **ThreadMXBean accesses thread information in the local JVM, which is 
already in memory, so accessing it is less expensive than fetching data from 
external resources such as disk or network.
   Thread state cache: The JVM typically maintains a cache of thread states, 
reducing the need for real-time calculations or additional data processing.**
   
   


-- 
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: commits-unsubscr...@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to