Bug 100712 - Error with "rollback"
Summary: Error with "rollback"
Alias: None
Product: Red Hat Web Application Framework
Classification: Retired
Component: persistence   
(Show other bugs)
Version: nightly
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Rafael H. Schloming
QA Contact: Jon Orris
Depends On:
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:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-01-03 20:03:46 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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
3175, set [com.arsdigita.docs.DocBlobject:{id=3175}].contentResource
set [kpmg.orion.documents.tax.TaxDocument:{id=3165}].content
       deps: []>
<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.RollbackRecord.rollback(RollbackRecord.java:148)
    at com.arsdigita.versioning.Versions.rollback(Versions.java:158)

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

How reproducible:

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.