Code review comment: you could update loaded rows in OlapTableTxnLogApplier.applyCommitLog, or DatabaseTransactionMgr.updateCatalogAfterCommitted  and only need do once.

Code under review:
private boolean loadTxnCommitImpl(TLoadTxnCommitRequest request) throws UserException {
        String cluster = request.getCluster();
        if (Strings.isNullOrEmpty(cluster)) {
            cluster = SystemInfoService.DEFAULT_CLUSTER;
        }
        if (request.isSetAuth_code()) {
            
        } else {
            checkPasswordAndPrivs(cluster, request.getUser(), request.getPasswd(), request.getDb(),
                    request.getTbl(), request.getUser_ip(), PrivPredicate.LOAD);
        }

        
        GlobalStateMgr globalStateMgr = GlobalStateMgr.getCurrentState();
        String fullDbName = ClusterNamespace.getFullName(cluster, request.getDb());
        Database db = globalStateMgr.getDb(fullDbName);
        if (db == null) {
            String dbName = fullDbName;
            if (Strings.isNullOrEmpty(request.getCluster())) {
                dbName = request.getDb();
            }
            throw new UserException("unknown database, database=" + dbName);
        }
        TxnCommitAttachment attachment = TxnCommitAttachment.fromThrift(request.txnCommitAttachment);
        long timeoutMs = request.isSetThrift_rpc_timeout_ms() ? request.getThrift_rpc_timeout_ms() : 5000;
        
        
        
        timeoutMs = timeoutMs * 3 / 4;
        boolean ret = GlobalStateMgr.getCurrentGlobalTransactionMgr().commitAndPublishTransaction(
                db, request.getTxnId(),
                TabletCommitInfo.fromThrift(request.getCommitInfos()),
                timeoutMs, attachment);
        if (!ret) {
            return ret;
        }
        
        MetricRepo.COUNTER_LOAD_FINISHED.increase(1L);
        if (null == attachment) {
            return ret;
        }
        
        Table tbl = db.getTable(request.getTbl());
        if (null == tbl) {
            return ret;
        }
        TableMetricsEntity entity = TableMetricsRegistry.getInstance().getMetricsEntity(tbl.getId());
        BasicStatsMeta basicStatsMeta =
                GlobalStateMgr.getCurrentAnalyzeMgr().getBasicStatsMetaMap().get(tbl.getId());
        switch (request.txnCommitAttachment.getLoadType()) {
            case ROUTINE_LOAD:
                if (!(attachment instanceof RLTaskTxnCommitAttachment)) {
                    break;
                }
                RLTaskTxnCommitAttachment routineAttachment = (RLTaskTxnCommitAttachment) attachment;
                entity.counterRoutineLoadFinishedTotal.increase(1L);
                entity.counterRoutineLoadBytesTotal.increase(routineAttachment.getReceivedBytes());
                entity.counterRoutineLoadRowsTotal.increase(routineAttachment.getLoadedRows());
                if (basicStatsMeta != null) {
                    basicStatsMeta.increase(routineAttachment.getLoadedRows());
                }

                break;
            case MANUAL_LOAD:
                if (!(attachment instanceof ManualLoadTxnCommitAttachment)) {
                    break;
                }
                ManualLoadTxnCommitAttachment streamAttachment = (ManualLoadTxnCommitAttachment) attachment;
                entity.counterStreamLoadFinishedTotal.increase(1L);
                entity.counterStreamLoadBytesTotal.increase(streamAttachment.getReceivedBytes());
                entity.counterStreamLoadRowsTotal.increase(streamAttachment.getLoadedRows());
                if (basicStatsMeta != null) {
                    basicStatsMeta.increase(streamAttachment.getLoadedRows());
                }

                break;
            default:
                break;
        }
        return ret;
    }

Line commented on: basicStatsMeta.increase(routineAttachment.getLoadedRows());

Revised code:
private boolean loadTxnCommitImpl(TLoadTxnCommitRequest request) throws UserException {
        String cluster = request.getCluster();
        if (Strings.isNullOrEmpty(cluster)) {
            cluster = SystemInfoService.DEFAULT_CLUSTER;
        }
        if (request.isSetAuth_code()) {
            
        } else {
            checkPasswordAndPrivs(cluster, request.getUser(), request.getPasswd(), request.getDb(),
                    request.getTbl(), request.getUser_ip(), PrivPredicate.LOAD);
        }

        
        GlobalStateMgr globalStateMgr = GlobalStateMgr.getCurrentState();
        String fullDbName = ClusterNamespace.getFullName(cluster, request.getDb());
        Database db = globalStateMgr.getDb(fullDbName);
        if (db == null) {
            String dbName = fullDbName;
            if (Strings.isNullOrEmpty(request.getCluster())) {
                dbName = request.getDb();
            }
            throw new UserException("unknown database, database=" + dbName);
        }
        TxnCommitAttachment attachment = TxnCommitAttachment.fromThrift(request.txnCommitAttachment);
        long timeoutMs = request.isSetThrift_rpc_timeout_ms() ? request.getThrift_rpc_timeout_ms() : 5000;
        
        
        
        timeoutMs = timeoutMs * 3 / 4;
        boolean ret = GlobalStateMgr.getCurrentGlobalTransactionMgr().commitAndPublishTransaction(
                db, request.getTxnId(),
                TabletCommitInfo.fromThrift(request.getCommitInfos()),
                timeoutMs, attachment);
        if (!ret) {
            return ret;
        }
        
        MetricRepo.COUNTER_LOAD_FINISHED.increase(1L);
        if (null == attachment) {
            return ret;
        }
        
        Table tbl = db.getTable(request.getTbl());
        if (null == tbl) {
            return ret;
        }
        TableMetricsEntity entity = TableMetricsRegistry.getInstance().getMetricsEntity(tbl.getId());
        BasicStatsMeta basicStatsMeta =
                GlobalStateMgr.getCurrentAnalyzeMgr().getBasicStatsMetaMap().get(tbl.getId());
        switch (request.txnCommitAttachment.getLoadType()) {
            case ROUTINE_LOAD:
                if (!(attachment instanceof RLTaskTxnCommitAttachment)) {
                    break;
                }
                RLTaskTxnCommitAttachment routineAttachment = (RLTaskTxnCommitAttachment) attachment;
                entity.counterRoutineLoadFinishedTotal.increase(1L);
                entity.counterRoutineLoadBytesTotal.increase(routineAttachment.getReceivedBytes());
                entity.counterRoutineLoadRowsTotal.increase(routineAttachment.getLoadedRows());
                if (basicStatsMeta != null) {
                    basicStatsMeta.increase(routineAttachment.getLoadedRows());
                }

                break;
            case MANUAL_LOAD:
                if (!(attachment instanceof ManualLoadTxnCommitAttachment)) {
                    break;
                }
                ManualLoadTxnCommitAttachment streamAttachment = (ManualLoadTxnCommitAttachment) attachment;
                entity.counterStreamLoadFinishedTotal.increase(1L);
                entity.counterStreamLoadBytesTotal.increase(streamAttachment.getReceivedBytes());
                entity.counterStreamLoadRowsTotal.increase(streamAttachment.getLoadedRows());
                if (basicStatsMeta != null) {
                    basicStatsMeta.increase(streamAttachment.getLoadedRows());
                }

                break;
            default:
                break;
        }
        return ret;
    }