Hi Guru, 

We met below two kinds of Optimistic exceptions when doing the transactions,
we use OPTIMISTIC and SERIALIZABLE isolation, do you have any suggestions,
or if we change to PESSIMISTIC, any risks on that, such as performance or
other exceptions? thanks.

{"log":"Caused by:
org.apache.ignite.internal.transactions.IgniteTxOptimisticCheckedException:
Failed to prepare transaction, read/write conflict [key=9999999992-USD,
keyCls=java.lang.String, val=Balance(accountId=9999999992, instrumentId=USD,
quantity=2307.81292028250000000000, reserved=0, lastUpdated=2020-07-31
03:10:36.889, lastUpdatedEvent=TRANSFER, tradeType=null),
valCls=ignite.entity.Balance, cache=Balance, thread=IgniteThread
[compositeRwLockIdx=7, stripe=4, plc=-1, holdsTopLock=false,
forbiddenToRequestBinaryMetadata=false,
name=sys-stripe-4-#5]]\n","stream":"stderr","time":"2020-07-31T03:10:36.953698541Z"}


{"log":"Caused by:
org.apache.ignite.internal.transactions.IgniteTxOptimisticCheckedException:
Failed to prepare transaction (lock conflict): GridDhtTxLocal
[nearNodeId=7e3589a0-c829-42a2-8fb4-115c57ba64f5,
nearFutId=3077cc2a371-7364caca-357e-49f2-840e-a101e7c64fa8, nearMiniId=1,
nearFinFutId=null, nearFinMiniId=0, nearXidVer=GridCacheVersion
[topVer=207644034, order=1596164732765, nodeOrder=2], lb=null,
super=GridDhtTxLocalAdapter [nearOnOriginatingNode=false,
nearNodes=KeySetView [], dhtNodes=KeySetView [], explicitLock=false,
super=IgniteTxLocalAdapter [completedBase=null, sndTransformedVals=false,
depEnabled=false, txState=IgniteTxStateImpl [activeCacheIds=[1325467324],
recovery=false, mvccEnabled=false, mvccCachingCacheIds=[], txMap=ArrayList
[IgniteTxEntry [txKey=IgniteTxKey [key=KeyCacheObjectImpl [part=45,
val=9999999992-USD, hasValBytes=true], cacheId=1325467324], val=[op=UPDATE,
val=ignite.entity.Balance [idHash=1055847466, hash=-1577210704,
accountId=9999999992, lastUpdated=2020-07-31 03:10:36.943,
quantity=1204.25992028250000000000, reserved=null, instrumentId=USD,
tradeType=null, lastUpdatedEvent=TRANSFER]], prevVal=[op=NOOP, val=null],
oldVal=[op=NOOP, val=null], entryProcessorsCol=null, ttl=-1,
conflictExpireTime=-1, conflictVer=null, explicitVer=null, dhtVer=null,
filters=CacheEntryPredicate[] [], filtersPassed=false, filtersSet=false,
entry=GridDhtCacheEntry [rdrs=ReaderId[] [], part=45,
super=GridDistributedCacheEntry [super=GridCacheMapEntry
[key=KeyCacheObjectImpl [part=45, val=9999999992-USD, hasValBytes=true],
val=null, ver=GridCacheVersion [topVer=207644034, order=1596164732830,
nodeOrder=1], hash=-148923086, extras=GridCacheObsoleteEntryExtras
[obsoleteVer=GridCacheVersion [topVer=2147483647, order=0, nodeOrder=0]],
flags=2]]], prepared=1, locked=false, nodeId=null, locMapped=false,
expiryPlc=null, transferExpiryPlc=false, flags=0, partUpdateCntr=0,
serReadVer=GridCacheVersion [topVer=207644034, order=1596164732670,
nodeOrder=1], xidVer=null], IgniteTxEntry [txKey=IgniteTxKey
[key=KeyCacheObjectImpl [part=504, val=1380978-USD, hasValBytes=true],
cacheId=1325467324], val=[op=UPDATE, val=ignite.entity.Balance
[idHash=577969755, hash=-2001853349, accountId=1380978,
lastUpdated=2020-07-31 03:10:36.95, quantity=13614077.57624000000000000000,
reserved=null, instrumentId=USD, tradeType=null,
lastUpdatedEvent=TRANSFER]], prevVal=[op=NOOP, val=null], oldVal=[op=NOOP,
val=null], entryProcessorsCol=null, ttl=-1, conflictExpireTime=-1,
conflictVer=null, explicitVer=null, dhtVer=null,
filters=CacheEntryPredicate[] [], filtersPassed=false, filtersSet=false,
entry=GridDhtCacheEntry [rdrs=ReaderId[] [], part=504,
super=GridDistributedCacheEntry [super=GridCacheMapEntry
[key=KeyCacheObjectImpl [part=504, val=1380978-USD, hasValBytes=true],
val=null, ver=GridCacheVersion [topVer=0, order=0, nodeOrder=0],
hash=1004605465, extras=null, flags=0]]], prepared=0, locked=false,
nodeId=null, locMapped=false, expiryPlc=null, transferExpiryPlc=false,
flags=0, partUpdateCntr=0, serReadVer=GridCacheVersion [topVer=207644034,
order=1596164732670, nodeOrder=1], xidVer=null]]], super=IgniteTxAdapter
[xidVer=GridCacheVersion [topVer=207644034, order=1596164732835,
nodeOrder=1], writeVer=null, implicit=false, loc=true, threadId=146,
startTime=1596165036958, nodeId=990fbcf8-4105-4aee-b03f-bef9141f5533,
startVer=GridCacheVersion [topVer=207644034, order=1596164732835,
nodeOrder=1], endVer=null, isolation=SERIALIZABLE, concurrency=OPTIMISTIC,
timeout=0, sysInvalidate=false, sys=false, plc=2, commitVer=null,
finalizing=NONE, invalidParts=null, state=MARKED_ROLLBACK, timedOut=false,
topVer=AffinityTopologyVersion [topVer=4, minorTopVer=1], mvccSnapshot=null,
skipCompletedVers=false, parentTx=null, duration=0ms, onePhaseCommit=false],
size=2]]]\n","stream":"stderr","time":"2020-07-31T03:10:37.002484848Z"}



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Reply via email to