Skip to content

Commit

Permalink
r
Browse files Browse the repository at this point in the history
  • Loading branch information
mymeiyi committed Sep 29, 2024
1 parent 6a09f40 commit 81a9612
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,10 @@ public long beginTransaction(TableIf table) throws Exception {
throw new AnalysisException(
"Transaction insert must be in the same database, expect db_id=" + this.database.getId());
}
if (subTransactionStates.size() >= Config.max_sub_transactions_in_transaction_load) {
throw new UserException("Transaction load can not have more than "
+ Config.max_sub_transactions_in_transaction_load + " sub transactions");
}
long subTxnId;
if (Config.isCloudMode()) {
TUniqueId queryId = ConnectContext.get().queryId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,4 +231,11 @@ suite("txn_insert_inject_case", "nonConcurrent") {
}
assertEquals(7, rowCount)
}

// check the limit of sub transaction num
try {

} finally {
sql """ admin set frontend config('max_sub_txn_num' = '100') """
}
}

0 comments on commit 81a9612

Please sign in to comment.