...
Another disadvantage is that the PrepareTxnState isn’t bounded if it tracks partitions and their offsets – some producers would produce data into topics with a large number of partitions, some producers would produce data into topics with a small number of partitions. Thus, the solution could work with some configurations (e.g. it was tested with VARCHAR(255)) and break when topic-partition properties get changed. On the other hand, {producerId, epoch} has a small and fixed size.
Support Multiple Concurrent Transactions Per Producer
Currently Kafka supports one transaction per producer, which may limit concurrency. It should be in principle possible to implement support for multiple concurrent transactions, but it seems to be an independent large improvement that deserves its own KIP that should be proposed separately. If such functionality is implemented in Kafka we could amend 2PC to work with multiple transactions.