Bug 100712 - Error with "rollback"
Summary: Error with "rollback"
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Red Hat Web Application Framework
Classification: Retired
Component: persistence
Version: nightly
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Rafael H. Schloming
QA Contact: Jon Orris
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-07-24 15:05 UTC by Randy Graebner
Modified: 2014-12-01 23:13 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-01-03 20:03:46 UTC
Embargoed:


Attachments (Terms of Use)

Description Randy Graebner 2003-07-24 15:05:38 UTC
Description of problem:

I have created a page that displays the history of a document along with a link
to roll the document back to a given transaction.  When clicking on the link for
earlier transactions I get the below error.  For more recent transactions, the
operation succeeds.  However, trying to roll back to the same transaction twice
gives the error as does rolling back to a transaction (say 200) and then trying
to roll back to an earlier transaction (say 100).

I will try to create a unit test to demonstrate this functionality.


java.lang.IllegalArgumentException: merging into nonexistent node: to=
<node events: [set [com.arsdigita.docs.DocBlobject:{id=3176}].contentResource
null, create [com.arsdigita.docs.DocBlobject:{id=3175}], set
[com.arsdigita.docs.DocBlobject:{id=3175}].id
3175, set [com.arsdigita.docs.DocBlobject:{id=3175}].contentResource
[kpmg.orion.documents.tax.TaxDocument:{id=3165}],
set [kpmg.orion.documents.tax.TaxDocument:{id=3165}].content
[com.arsdigita.docs.DocBlobject:{id=3175}]]
       deps: []>
from=
<node events: [set [com.arsdigita.docs.DocBlobject:{id=3175}].content [B@512a7e0f]
       deps: [create [com.arsdigita.docs.DocBlobject:{id=3175}]]>
    at com.redhat.persistence.engine.rdbms.Aggregator.merge(Aggregator.java:95)
    at com.redhat.persistence.engine.rdbms.Aggregator.onSet(Aggregator.java:276)
    at com.redhat.persistence.SetEvent.dispatch(SetEvent.java(Compiled Code))
    at com.redhat.persistence.engine.rdbms.RDBMSEngine.write(RDBMSEngine.java:267)
    at com.redhat.persistence.Session.flushInternal(Session.java(Compiled Code))
    at com.redhat.persistence.Session.flush(Session.java:482)
    at com.arsdigita.persistence.DataObjectImpl.delete(DataObjectImpl.java:341)
    at
com.arsdigita.versioning.ProxyDataObject.deleteIfTerminal(ProxyDataObject.java:578)
    at
com.arsdigita.versioning.RollbackRecord.removeTerminalObjects(RollbackRecord.java:323)
    at com.arsdigita.versioning.RollbackRecord.rollback(RollbackRecord.java:148)
    at com.arsdigita.versioning.Versions.rollback(Versions.java:158)
    at
kpmg.orionweb.document.ViewDocumentHistoryAction.execute(ViewDocumentHistoryAction.java:66)


Version-Release number of selected component (if applicable):
Tip

How reproducible:
Always

Steps to Reproduce:
I am working on creating a unit test for it but first I have to get my unit
tests running.

Comment 1 Vadim Nasardinov 2003-07-24 15:12:41 UTC
If you look at //core-platform/dev/test/src/com/arsdigita/versioning, 
you may find machinery that may be useful to you.  In particular, 
look at the fakeCommit() method in VersioningEventProcessorTest. 
It allows you fake multiple "transactions" within a single db transaction. 
This is useful for bugs that can only be reproduced across two or 
more distinct db transactions. 
 
 

Comment 2 Rafael H. Schloming 2003-07-29 20:17:16 UTC
This bug is fixed on the tip. The exception was caused by the internal data
structures used by Aggregator.java becoming inconsistent. I changed those data
structures in such a way that it is impossible for them to become inconsistent
in this manner. Randy reports that this does in fact fix the problem, but it is
difficult to verify this independently since we don't have an isolated test case
that demonstrates the problem.

Comment 3 Jon Orris 2003-08-05 15:49:44 UTC
Needs a test case

Comment 4 David Lawrence 2006-07-18 02:58:10 UTC
QA_READY has been deprecated in favor of ON_QA. Please use ON_QA in the future.
Moving to ON_QA.


Note You need to log in before you can comment on or make changes to this bug.