Skip to content

Commit

Permalink
[improvement](mow) Add more log on getDeleteBitmapUpdateLock (apache#…
Browse files Browse the repository at this point in the history
…37728)

getDeleteBitmapUpdateLock may cost too much time, here is an example:
2024-07-08 16:58:43,050 INFO (thrift-server-pool-1|183)
[CloudGlobalTransactionMgr.getDeleteBitmapUpdateLock():521] get delete
bitmap lock successfully. txns: 27787309217006594. time cost: 10500 ms.
So need to add more log to find out why it cost so much time.
  • Loading branch information
hust-hhb authored Jul 15, 2024
1 parent 42a311d commit 55486bb
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,7 @@ private void getDeleteBitmapUpdateLock(Map<Long, Set<Long>> tableToParttions, lo
}
StopWatch stopWatch = new StopWatch();
stopWatch.start();
int totalRetryTime = 0;
for (Map.Entry<Long, Set<Long>> entry : tableToParttions.entrySet()) {
GetDeleteBitmapUpdateLockRequest.Builder builder = GetDeleteBitmapUpdateLockRequest.newBuilder();
builder.setTableId(entry.getKey())
Expand Down Expand Up @@ -790,10 +791,15 @@ private void getDeleteBitmapUpdateLock(Map<Long, Set<Long>> tableToParttions, lo
cumulativePoints.put(tabletId, respCumulativePoints.get(i));
}
}
totalRetryTime += retryTime;
}
stopWatch.stop();
LOG.info("get delete bitmap lock successfully. txns: {}. time cost: {} ms.",
transactionId, stopWatch.getTime());
if (totalRetryTime > 0 || stopWatch.getTime() > 20) {
LOG.info(
"get delete bitmap lock successfully. txns: {}. totalRetryTime: {}. "
+ "partitionSize: {}. time cost: {} ms.",
transactionId, totalRetryTime, tableToParttions.size(), stopWatch.getTime());
}
}

private void sendCalcDeleteBitmaptask(long dbId, long transactionId,
Expand Down

0 comments on commit 55486bb

Please sign in to comment.