imay commented on a change in pull request #368: Add a frontend interface for
committing RoutineLoadTask
URL: https://github.com/apache/incubator-doris/pull/368#discussion_r239093112
##########
File path:
fe/src/main/java/org/apache/doris/transaction/GlobalTransactionMgr.java
##########
@@ -121,14 +127,17 @@ public long beginTransaction(long dbId, String label,
String coordinator, LoadJo
if (txnLabels != null && txnLabels.containsKey(label)) {
throw new LabelAlreadyExistsException("label already exists,
label=" + label);
}
- if (runningTxnNums.get(dbId) != null
+ if (runningTxnNums.get(dbId) != null
&& runningTxnNums.get(dbId) >
Config.max_running_txn_num_per_db) {
- throw new BeginTransactionException("current running txns on
db " + dbId + " is "
- + runningTxnNums.get(dbId) + ", larger than limit " +
Config.max_running_txn_num_per_db);
+ throw new BeginTransactionException("current running txns on
db " + dbId + " is "
+ + runningTxnNums.get(dbId) + ", larger than limit " +
Config.max_running_txn_num_per_db);
}
long tid = idGenerator.getNextTransactionId();
LOG.debug("beginTransaction: tid {} with label {} from coordinator
{}", tid, label, coordinator);
TransactionState transactionState = new TransactionState(dbId,
tid, label, sourceType, coordinator);
+ if (transactionCallback != null) {
Review comment:
I think you can add callback to `TransactionState` constructor to avoid this
`if` statement. And I prefer `TransactionStateChangeListener` to `Callback`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]