You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "hust-hhb (via GitHub)" <gi...@apache.org> on 2023/03/21 11:19:43 UTC
[GitHub] [doris] hust-hhb commented on a diff in pull request #17965: [feature](log)check and log acquire/held lock time when it exceeds threshold
hust-hhb commented on code in PR #17965:
URL: https://github.com/apache/doris/pull/17965#discussion_r1143225500
##########
fe/fe-core/src/main/java/org/apache/doris/transaction/DatabaseTransactionMgr.java:
##########
@@ -141,20 +143,30 @@ public class DatabaseTransactionMgr {
// not realtime usedQuota value to make a fast check for database data quota
private volatile long usedQuotaDataBytes = -1;
+ private long lockWriteStart;
+
+ private long lockReportingThresholdMs = Config.lock_reporting_threshold_ms;
protected void readLock() {
+ long waitReadStart = System.currentTimeMillis();
this.transactionLock.readLock().lock();
+ checkAndLogWaitTime(waitReadStart, System.currentTimeMillis());
Review Comment:
Thanks for comment, i have changed the code.
I agree to remove lock wait time, and i thinks it's only necessary to record the time of holding write lock, which is sufficient to reflect to situation of lock.
--
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-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org