Skip to content

Commit

Permalink
[improve](routine-load) reduce routine load job transaction info stor…
Browse files Browse the repository at this point in the history
…age in memory #30903
  • Loading branch information
sollhui authored Feb 6, 2024
1 parent 59730bb commit c0e3287
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -594,12 +594,6 @@ public void updateMultiTableRunningTransactionTableIds(Long dbId, Long transacti
throw new UserException(NOT_SUPPORTED_MSG);
}

@Override
public void putTransactionTableNames(Long dbId, Long transactionId, List<Long> tableIds)
throws Exception {
throw new Exception(NOT_SUPPORTED_MSG);
}

@Override
public TWaitingTxnStatusResult getWaitingTxnStatus(TWaitingTxnStatusRequest request)
throws AnalysisException, TimeoutException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1931,7 +1931,6 @@ public TStreamLoadMultiTablePutResult streamLoadMultiTablePut(TStreamLoadPutRequ
}
long timeoutMs = request.isSetThriftRpcTimeoutMs() ? request.getThriftRpcTimeoutMs() : 5000;
List planFragmentParamsList = new ArrayList<>(tableNames.size());
List<Long> tableIds = olapTables.stream().map(OlapTable::getId).collect(Collectors.toList());
// todo: if is multi table, we need consider the lock time and the timeout
boolean enablePipelineLoad = Config.enable_pipeline_load;
try {
Expand All @@ -1949,8 +1948,6 @@ public TStreamLoadMultiTablePutResult streamLoadMultiTablePut(TStreamLoadPutRequ
}
multiTableFragmentInstanceIdIndexMap.put(request.getTxnId(), ++index);
}
Env.getCurrentGlobalTransactionMgr()
.putTransactionTableNames(db.getId(), request.getTxnId(), tableIds);
LOG.debug("receive stream load multi table put request result: {}", result);
} catch (Throwable e) {
LOG.warn("catch unknown result.", e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2246,17 +2246,6 @@ private static String getStackTrace(Thread t) {
return msgBuilder.toString();
}

protected void putTransactionTableNames(long transactionId, List<Long> tableIds) {
if (CollectionUtils.isEmpty(tableIds)) {
return;
}
if (multiTableRunningTransactionTableIdMaps.contains(transactionId)) {
multiTableRunningTransactionTableIdMaps.get(transactionId).addAll(tableIds);
return;
}
multiTableRunningTransactionTableIdMaps.put(transactionId, tableIds);
}

/**
* Update transaction table ids by transaction id.
* it's used for multi table transaction.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,12 +455,6 @@ public void updateMultiTableRunningTransactionTableIds(Long dbId, Long transacti
getDatabaseTransactionMgr(dbId).updateMultiTableRunningTransactionTableIds(transactionId, tableIds);
}

@Override
public void putTransactionTableNames(Long dbId, Long transactionId, List<Long> tableIds)
throws Exception {
getDatabaseTransactionMgr(dbId).putTransactionTableNames(transactionId, tableIds);
}

@Override
public TWaitingTxnStatusResult getWaitingTxnStatus(TWaitingTxnStatusRequest request)
throws AnalysisException, TimeoutException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ public boolean isPreviousTransactionsFinished(long endTransactionId, long dbId,
public void updateMultiTableRunningTransactionTableIds(Long dbId, Long transactionId, List<Long> tableIds)
throws UserException;

public void putTransactionTableNames(Long dbId, Long transactionId, List<Long> tableIds)
throws Exception;

public TWaitingTxnStatusResult getWaitingTxnStatus(TWaitingTxnStatusRequest request)
throws AnalysisException, TimeoutException;

Expand Down

0 comments on commit c0e3287

Please sign in to comment.