An old transaction with the same id is still open: 1 [1.4.198/102]

32 views
Skip to first unread message

Mark McKeown

unread,
May 30, 2019, 9:01:57 AM5/30/19
to H2 Database
Hi All,
           We have hit the following problem when using MvStore 1.4.198

java.lang.IllegalStateException: An old transaction with the same id is still open: 1 [1.4.198/102]
        at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:883)
        at org.h2.mvstore.tx.TransactionStore.addUndoLogRecord(TransactionStore.java:407)
        at org.h2.mvstore.tx.Transaction.log(Transaction.java:306)
        at org.h2.mvstore.tx.TxDecisionMaker.logIt(TxDecisionMaker.java:131)
        at org.h2.mvstore.tx.TxDecisionMaker.decide(TxDecisionMaker.java:69)
        at org.h2.mvstore.tx.TxDecisionMaker$PutDecisionMaker.decide(TxDecisionMaker.java:199)
        at org.h2.mvstore.MVMap.operate(MVMap.java:1670)
        at org.h2.mvstore.tx.TransactionMap.set(TransactionMap.java:306)
        at org.h2.mvstore.tx.TransactionMap.set(TransactionMap.java:289)
        at org.h2.mvstore.tx.TransactionMap.put(TransactionMap.java:226)

The code that triggers this is:

Transaction tx = ts.begin();
TransactionMap<Long, AgreedProposal> map = tx.openMap(mapId);
old = map.put(agreed.getKey(), agreed);
TransactionMap<String, Long> highestKeyMap = tx.openMap(HIGHEST_KEY_MAP);
// We track the highest key we see.
highestKeyMap.put(highestSendKeyLookup, agreed.getKey());
tx.commit();


I found another post from someone who hit a similar issue but they had multiple threads using the same transaction which we are not doing.

This only triggers when we do a load test of our application. 

Any advice on how we could be triggering this, or how to debug? I am trying to isolate it in a unit test.

I rolled back to 1.4.197 but got an "Entry is locked [1.4.197/101]" error. 

I will test with 1.4.199 but I suspect it is some code change we  did that is triggering this.

cheers
Mark

The LIVE DATA Company
Find out more wandisco.com

THIS MESSAGE AND ANY ATTACHMENTS ARE CONFIDENTIAL, PROPRIETARY AND MAY BE PRIVILEGED

If this message was misdirected, WANdisco, Inc. and its subsidiaries, ("WANdisco") does not waive any confidentiality or privilege. If you are not the intended recipient, please notify us immediately and destroy the message without disclosing its contents to anyone. Any distribution, use or copying of this email or the information it contains by other than an intended recipient is unauthorized. The views and opinions expressed in this email message are the author's own and may not reflect the views and opinions of WANdisco, unless the author is authorized by WANdisco to express such views or opinions on its behalf. All email sent to or from this address is subject to electronic storage and review by WANdisco. Although WANdisco operates anti-virus programs, it does not accept responsibility for any damage whatsoever caused by viruses being passed.

Mark McKeown

unread,
May 31, 2019, 4:55:14 PM5/31/19
to H2 Database
Traced this down to another thread removing a map.

cheers Mark
Reply all
Reply to author
Forward
0 new messages