]
Galder Zamarreno resolved JBCACHE-1519.
---------------------------------------
Fix Version/s: 3.2.0.GA
(was: 3.3.0.GA)
Resolution: Done
ClassCastException in ReadCommittedNode.markForUpdate()
-------------------------------------------------------
Key: JBCACHE-1519
URL:
https://jira.jboss.org/jira/browse/JBCACHE-1519
Project: JBoss Cache
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Locking, Transactions
Affects Versions: 3.1.0.GA
Reporter: Krzysztof Sobolewski
Assignee: Galder Zamarreno
Fix For: 3.2.0.GA
Attachments: ClassCastExceptionTest.java, patch.txt
The exception is deterministic (test case is attached) and even easy to reproduce.
Prerequisites:
- isolation level READ_COMMITTED
- lockParentForChildInsertRemove == true
- transactions (not sure about this one)
The test attached most probably isn't minimal, but it's small enough (it's
almost exactly what my application does). The test adds a small tree in one transaction
then in another transaction removes it and adds again, and it does both of those in a
loop. The exception is in the *second* iteration.
The exception occurs because the line 121 of ReadCommittedNode expects the backup of node
to be NodeReference, but somehow it's an UnversionedNode instead. This node is
retrieved from the data container, where the child is being added as an UnversionedNode by
MVCCNodeHelper line 338. When lockParentForChildInsertRemove is false this fragment is
never executed and there is no exception.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: