Skip to content

Commit

Permalink
[branch-2.0](multi-table-load) reduce routine load job transaction in…
Browse files Browse the repository at this point in the history
…fo storage in memory #30903 (#30967)
  • Loading branch information
sollhui authored Feb 7, 2024
1 parent 8bade7a commit b7f513e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2031,7 +2031,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 @@ -2049,9 +2048,6 @@ public TStreamLoadMultiTablePutResult streamLoadMultiTablePut(TStreamLoadPutRequ
}
multiTableFragmentInstanceIdIndexMap.put(request.getTxnId(), ++index);
}
Env.getCurrentGlobalTransactionMgr().getDatabaseTransactionMgr(db.getId())
.putTransactionTableNames(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 @@ -2108,17 +2108,6 @@ private static String getStackTrace(Thread t) {
return msgBuilder.toString();
}

public 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

0 comments on commit b7f513e

Please sign in to comment.