Details
Description
I am trying to retrieve the record CounterVar (id=4, type=1) - see mapping file description below - in one transaction. In the same program, with a different transaction, I am trying to retrieve the record CounterVar (id=1, type=1) in the DbLocked mode. Note that in both cases the type field references the same record. This results in my second transaction getting LockNotGrantedException (writeLockTimeout). When I rollback both transactions and retry the retrieve (in the context of the same process), I observed that the call to QueryResults.size() returns 1, but the call to QueryResults.hasMore() returns false. On further investigation, I found that the call to hasMore() sees the following exception stack trace:
org.exolab.castor.jdo.ObjectNotFoundException: The object of type CounterVar with identity 1 was not found in persistent storage
at org.exolab.castor.persist.LockEngine.load(LockEngine.java:385)
at org.exolab.castor.persist.TransactionContext.load(TransactionContext.java:651)
at org.exolab.castor.persist.QueryResults.fetch(QueryResults.java:229)
at org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.hasMore(OQLQueryImpl.java:633)
at org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.hasMore(OQLQueryImpl.java:614)
at TestWriteLockTimeout.main(TestWriteLockTimeout.java:84)
In looking at the code, I see that LockEngine.load() is actually converting the exception ObjectDeletedWaitingForLockException into ObjectNotFoundException.
I am guessing that this is happening because of the previous (unsuccessful) retrieve.
Activity
| Field | Original Value | New Value |
|---|---|---|
| Attachment | bug1247.tar [ 17248 ] |
| Assignee | Werner Guttmann [ wguttmn ] |
| Remaining Estimate | 0 minutes [ 0 ] | |
| Time Spent | 20 minutes [ 1200 ] |
| Attachment | TestWriteLockTimeout.java [ 17434 ] |
| Attachment | output.txt [ 17435 ] |
| Fix Version/s | 0.9.9.1 [ 12055 ] | |
| Description |
I am trying to retrieve the record CounterVar (id=4, type=1) - see mapping file description below - in one transaction. In the same program, with a different transaction, I am trying to retrieve the record CounterVar (id=1, type=1) in the DbLocked mode. Note that in both cases the type field references the same record. This results in my second transaction getting LockNotGrantedException (writeLockTimeout). When I rollback both transactions and retry the retrieve (in the context of the same process), I observed that the call to QueryResults.size() returns 1, but the call to QueryResults.hasMore() returns false. On further investigation, I found that the call to hasMore() sees the following exception stack trace: org.exolab.castor.jdo.ObjectNotFoundException: The object of type CounterVar with identity 1 was not found in persistent storage at org.exolab.castor.persist.LockEngine.load(LockEngine.java:385) at org.exolab.castor.persist.TransactionContext.load(TransactionContext.java:651) at org.exolab.castor.persist.QueryResults.fetch(QueryResults.java:229) at org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.hasMore(OQLQueryImpl.java:633) at org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.hasMore(OQLQueryImpl.java:614) at TestWriteLockTimeout.main(TestWriteLockTimeout.java:84) In looking at the code, I see that LockEngine.load() is actually converting the exception ObjectDeletedWaitingForLockException into ObjectNotFoundException. I am guessing that this is happening because of the previous (unsuccessful) retrieve. |
I am trying to retrieve the record CounterVar (id=4, type=1) - see mapping file description below - in one transaction. In the same program, with a different transaction, I am trying to retrieve the record CounterVar (id=1, type=1) in the DbLocked mode. Note that in both cases the type field references the same record. This results in my second transaction getting LockNotGrantedException (writeLockTimeout). When I rollback both transactions and retry the retrieve (in the context of the same process), I observed that the call to QueryResults.size() returns 1, but the call to QueryResults.hasMore() returns false. On further investigation, I found that the call to hasMore() sees the following exception stack trace: org.exolab.castor.jdo.ObjectNotFoundException: The object of type CounterVar with identity 1 was not found in persistent storage at org.exolab.castor.persist.LockEngine.load(LockEngine.java:385) at org.exolab.castor.persist.TransactionContext.load(TransactionContext.java:651) at org.exolab.castor.persist.QueryResults.fetch(QueryResults.java:229) at org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.hasMore(OQLQueryImpl.java:633) at org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.hasMore(OQLQueryImpl.java:614) at TestWriteLockTimeout.main(TestWriteLockTimeout.java:84) In looking at the code, I see that LockEngine.load() is actually converting the exception ObjectDeletedWaitingForLockException into ObjectNotFoundException. I am guessing that this is happening because of the previous (unsuccessful) retrieve. |
| Attachment | patch.C1247.20051112.txt [ 17548 ] |
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Resolution | Fixed [ 1 ] |
| Attachment | patch.C1247.20051112.bug-report.txt [ 17549 ] |
| Status | Resolved [ 5 ] | Closed [ 6 ] |