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

w41ter pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new cd6e38b6d41 [Improvement](Cloud) Avoid unnecessary RPC to meta service 
for watershed txn id. (#37204)
cd6e38b6d41 is described below

commit cd6e38b6d4134001dd58363f64679fb5a57a68a5
Author: Shuo Wang <wangshuo...@gmail.com>
AuthorDate: Thu Jul 11 12:03:06 2024 +0800

    [Improvement](Cloud) Avoid unnecessary RPC to meta service for watershed 
txn id. (#37204)
    
    This PR proposed to reduce the number of RPC from FE to meta service for
    next txn ID when register watershed txn ID.
---
 .../src/main/java/org/apache/doris/cloud/catalog/CloudUpgradeMgr.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/cloud/catalog/CloudUpgradeMgr.java 
b/fe/fe-core/src/main/java/org/apache/doris/cloud/catalog/CloudUpgradeMgr.java
index 58ae0256cd0..5f2a80274e5 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/cloud/catalog/CloudUpgradeMgr.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/cloud/catalog/CloudUpgradeMgr.java
@@ -115,8 +115,9 @@ public class CloudUpgradeMgr extends MasterDaemon {
     public void registerWaterShedTxnId(long be) throws UserException {
         LinkedBlockingQueue<DbWithWaterTxn> txnIds = new 
LinkedBlockingQueue<>();
         List<Long> dbids = Env.getCurrentInternalCatalog().getDbIds();
+        Long nextTransactionId = 
Env.getCurrentGlobalTransactionMgr().getNextTransactionId();
         for (long dbid : dbids) {
-            txnIds.offer(new DbWithWaterTxn(dbid, 
Env.getCurrentGlobalTransactionMgr().getNextTransactionId()));
+            txnIds.offer(new DbWithWaterTxn(dbid, nextTransactionId));
         }
         txnBePairList.offer(new DbWithWaterTxnInBe(txnIds, be));
         LOG.info("register watershedtxnid {} for BE {}", txnIds.stream()


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

Reply via email to