apache / ignite

Apache Ignite
https://ignite.apache.org/
Apache License 2.0
4.82k stars 1.9k forks source link

Transaction is being rolled back automatically by some process on Ignite 2.15 and 2.16 #11390

Open adiaz-dev opened 5 months ago

adiaz-dev commented 5 months ago

Hi community,

Recently when trying to migrate a tool from Ignite 2.14 to 2.15 or 2.16, I started to see that our puts were being rollback automatically by some internal process on Ignite, specifically we are getting the following exception:

org.apache.ignite.internal.transactions.IgniteTxRollbackCheckedException: Failed to finish transaction because it has been rolled back [timeout=60000, tx=GridDhtTxLocal[xid=2e9746e0091-00000000-13a 6-dc0d-0000-000000000001,......

Please see ignite_trasaction_rollback-log.txt for a complete stack trace.

This is my configuration:

  1. Number of threads: 10 (putting records into caches).
  2. Transaction Concurrency: PESSIMISTIC
  3. Transaction Isolation: REPEATABLE_READ
  4. Transaction timeout: 60 seconds
  5. Cache Atomicity Mode: TRANSACTIONAL

My exact same code works on prior to these new 2 versions, so something new was added that now it is causing a problem about transactions. Could you please help to determine what could be the reason of the problem?

Thanks in advance and regards,

ptupitsyn commented 5 months ago

Could it be rolled back due to a timeout?

adiaz-dev commented 5 months ago

Hi Pavel,

The problem is that just started to happen on Ignite 2.15 and only when we use more than 1 thread, otherwise we dont have that timeout.

Best regards

ptupitsyn commented 5 months ago

only when we use more than 1 thread

Multiple threads cause contention on the same key, leading to transaction timeout and rollback?