pip/pip-154.md
Currently, the transaction coordinator does not limit the number of active transactions, which may cause the following problems:
add maxActiveTransactions into broker.conf
# The max active transactions in one transaction coordinator
maxActiveTransactionsPerCoordinator=10000
If reach the maxActiveTransactions, return the Exception to client. It has a lot of disadvantages:
When this op request reach the maxActiveTransactions, coordinator don't return any response for this request. ignore this request directly. In this way, broker don't need to add any exception for this config.
If broker don't return the reponse for this request, the op of open txn will timeout. and in coordinator client, it has a semaphore to control the op of txn(open, add produce topic, add ack topic, end txn). In the timeout time, the coordinator client only can open the number of semaphore txns. Any other request will be block. So this design slove this two problems:
If you are worried that this design will affect the client-side experience, because the open transaction will always time out and other txn op will be blocked. I think your worry is superfluous, At this time, you should consider increasing the performance of the cluster or find the problematic client to repair.
maxActiveTransactions default = 0, if maxActiveTransactions will not block open txn
reach maxActiveTransactions client open txn will timeout
If reach the maxActiveTransactions, return the Exception to client. It has a lot of disadvantages: