This is an automated email from the ASF dual-hosted git repository.

dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new 04b8633ff5e [improve](cloud-mow)Modify some mow log to help solve 
problem (#47927)
04b8633ff5e is described below

commit 04b8633ff5ec1e749ef63e7eb1d1807953cc9840
Author: huanghaibin <huanghai...@selectdb.com>
AuthorDate: Thu May 15 17:54:21 2025 +0800

    [improve](cloud-mow)Modify some mow log to help solve problem (#47927)
    
    ### What problem does this PR solve?
    pick pr #47695
---
 .../transaction/CloudGlobalTransactionMgr.java     | 25 ++++++++++++++++++----
 1 file changed, 21 insertions(+), 4 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/cloud/transaction/CloudGlobalTransactionMgr.java
 
b/fe/fe-core/src/main/java/org/apache/doris/cloud/transaction/CloudGlobalTransactionMgr.java
index 9c195ec8beb..c91bcbf7475 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/cloud/transaction/CloudGlobalTransactionMgr.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/cloud/transaction/CloudGlobalTransactionMgr.java
@@ -855,6 +855,7 @@ public class CloudGlobalTransactionMgr implements 
GlobalTransactionMgrIface {
         stopWatch.start();
         getPartitionInfo(mowTableList, tabletCommitInfos, lockContext);
         int totalRetryTime = 0;
+        String retryMsg = "";
         for (Map.Entry<Long, Set<Long>> entry : 
lockContext.getTableToPartitions().entrySet()) {
             GetDeleteBitmapUpdateLockRequest.Builder builder = 
GetDeleteBitmapUpdateLockRequest.newBuilder();
             
builder.setTableId(entry.getKey()).setLockId(transactionId).setInitiator(-1)
@@ -902,9 +903,11 @@ public class CloudGlobalTransactionMgr implements 
GlobalTransactionMgrIface {
                         break;
                     }
                 } catch (Exception e) {
-                    LOG.warn("ignore get delete bitmap lock exception, 
transactionId={}, retryTime={}", transactionId,
-                            retryTime, e);
+                    LOG.warn("ignore get delete bitmap lock exception, 
transactionId={}, retryTime={}, tableIds={}",
+                            transactionId,
+                            retryTime, 
mowTableList.stream().map(Table::getId).collect(Collectors.toList()), e);
                 }
+                retryMsg = response.toString();
                 if (DebugPointUtil.isEnable("FE.mow.check.lock.release")
                         && response.getStatus().getCode() == 
MetaServiceCode.LOCK_CONFLICT) {
                     throw new UserException(InternalErrorCode.INTERNAL_ERR,
@@ -971,8 +974,9 @@ public class CloudGlobalTransactionMgr implements 
GlobalTransactionMgrIface {
         }
         stopWatch.stop();
         LOG.info("get delete bitmap lock successfully. txnId: {}. 
totalRetryTime: {}. "
-                        + "tableSize: {}. cost: {} ms.", transactionId, 
totalRetryTime,
-                lockContext.getTableToPartitions().size(), 
stopWatch.getTime());
+                        + "tableSize: {}. cost: {} ms. tableIds: {}. retryMsg: 
{}.", transactionId, totalRetryTime,
+                lockContext.getTableToPartitions().size(), stopWatch.getTime(),
+                
mowTableList.stream().map(Table::getId).collect(Collectors.toList()), retryMsg);
     }
 
     private void removeDeleteBitmapUpdateLock(List<OlapTable> tableList, long 
transactionId) {
@@ -1250,6 +1254,11 @@ public class CloudGlobalTransactionMgr implements 
GlobalTransactionMgrIface {
         }
 
         List<Table> tablesToLock = getTablesNeedCommitLock(tableList);
+        StopWatch stopWatch = null;
+        if (!tablesToLock.isEmpty()) {
+            stopWatch = new StopWatch();
+            stopWatch.start();
+        }
         increaseWaitingLockCount(tablesToLock);
         if (!tablesToLock.isEmpty() && 
DebugPointUtil.isEnable("FE.mow.check.lock.release")) {
             for (int i = 0; i < tablesToLock.size(); i++) {
@@ -1280,6 +1289,14 @@ public class CloudGlobalTransactionMgr implements 
GlobalTransactionMgrIface {
                     "get table cloud commit lock timeout, tableList=("
                             + StringUtils.join(tablesToLock, ",") + ")");
         }
+        if (stopWatch != null) {
+            stopWatch.stop();
+            long costTimeMs = stopWatch.getTime();
+            if (costTimeMs > 1000) {
+                LOG.warn("get table cloud commit lock, tableList=(" + 
StringUtils.join(tablesToLock, ",") + ")"
+                        + ", transactionId=" + transactionId + ", cost=" + 
costTimeMs + " ms");
+            }
+        }
 
         try {
             commitTransactionWithoutLock(db.getId(), tableList, transactionId, 
tabletCommitInfos, txnCommitAttachment);


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

Reply via email to