Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] CDO Workspace. On commit 'Change set is outdated'
[CDO] CDO Workspace. On commit 'Change set is outdated' [message #893883] Thu, 05 July 2012 19:38 Go to next message
Per Sterner is currently offline Per SternerFriend
Messages: 91
Registered: October 2011
Member
Hello,

I am using the CDO Workspace feature and I get the message 'Change set is outdated'.

1. checkout
2. workspace.openTransaction. Add items. transaction.commit
3. workspace.openTransaction. Add items. transaction.commit
4. workspace.commit
5. workspace.openTransaction. Add items. transaction.commit
6. workspace.commit

At the point '6.' I get the message 'Change set is outdated'.

I have tried a 'workspace.update' after '4.' but it did not change the result. Am I missing something?

Regards,
Per Sterner

Here the code:

File: org.eclipse.emf.cdo.tests.WorkspaceTest.java

public void testCheckinAfterAddExt() throws Exception
  {
    InternalCDOWorkspace workspace = checkout("MAIN", CDOBranchPoint.UNSPECIFIED_DATE);
    IOUtil.ERR().println("Checkout done");

    int i;
    CDOResource resource;
    CDOCommitInfo info;

    CDOTransaction transaction = workspace.openTransaction();
    resource = transaction.getResource(getResourcePath(RESOURCE));
    for (i = 0; i < PRODUCTS; i++)
    {
      resource.getContents().add(createProduct(i));
    }

    transaction.commit();
    transaction.close();
    transaction = workspace.openTransaction();
    resource = transaction.getResource(getResourcePath(RESOURCE));
    for (i = 0; i < PRODUCTS; i++)
    {
      resource.getContents().add(createProduct(i));
    }

    transaction.commit();
    transaction.close();
    info = workspace.checkin();

    // workspace.update(null);

    transaction = workspace.openTransaction();
    resource = transaction.getResource(getResourcePath(RESOURCE));
    for (i = 0; i < PRODUCTS; i++)
    {
      resource.getContents().add(createProduct(i));
    }

    transaction.commit();
    transaction.close();

    info = workspace.checkin();
  }
Re: [CDO] CDO Workspace. On commit 'Change set is outdated' [message #893963 is a reply to message #893883] Fri, 06 July 2012 08:31 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Per,

I've already started to investigate this. It looks like a small bug in CDOTransactionImpl.applyChangedObjects() that
affects committing (checkin) the remote transaction. Please submit a bugzilla so that we can track the progress.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Am 05.07.2012 21:38, schrieb Per Sterner:
> Hello,
>
> I am using the CDO Workspace feature and I get the message 'Change set is outdated'.
>
> 1. checkout
> 2. workspace.openTransaction. Add items. transaction.commit
> 3. workspace.openTransaction. Add items. transaction.commit
> 4. workspace.commit
> 5. workspace.openTransaction. Add items. transaction.commit
> 6. workspace.commit
>
> At the point '6.' I get the message 'Change set is outdated'.
>
> I have tried a 'workspace.update' after '4.' but it did not change the result. Am I missing something?
> Regards,
> Per Sterner
>
> Here the code:
>
>
> File: org.eclipse.emf.cdo.tests.WorkspaceTest.java
>
> public void testCheckinAfterAddExt() throws Exception
> {
> InternalCDOWorkspace workspace = checkout("MAIN", CDOBranchPoint.UNSPECIFIED_DATE);
> IOUtil.ERR().println("Checkout done");
>
> int i;
> CDOResource resource;
> CDOCommitInfo info;
>
> CDOTransaction transaction = workspace.openTransaction();
> resource = transaction.getResource(getResourcePath(RESOURCE));
> for (i = 0; i < PRODUCTS; i++)
> {
> resource.getContents().add(createProduct(i));
> }
>
> transaction.commit();
> transaction.close();
> transaction = workspace.openTransaction();
> resource = transaction.getResource(getResourcePath(RESOURCE));
> for (i = 0; i < PRODUCTS; i++)
> {
> resource.getContents().add(createProduct(i));
> }
>
> transaction.commit();
> transaction.close();
> info = workspace.checkin();
>
> // workspace.update(null);
>
> transaction = workspace.openTransaction();
> resource = transaction.getResource(getResourcePath(RESOURCE));
> for (i = 0; i < PRODUCTS; i++)
> {
> resource.getContents().add(createProduct(i));
> }
>
> transaction.commit();
> transaction.close();
>
> info = workspace.checkin();
> }
>


Re: [CDO] CDO Workspace. On commit 'Change set is outdated' [message #893983 is a reply to message #893963] Fri, 06 July 2012 10:29 Go to previous message
Per Sterner is currently offline Per SternerFriend
Messages: 91
Registered: October 2011
Member
Thank you for the fast reply,

The bugzilla entry is:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=384454

Regards,

Per
Previous Topic:OutOfMemoryError when saving resource
Next Topic:Edit domain of eclipse not providing the child nodes when product is exported
Goto Forum:
  


Current Time: Thu Apr 18 09:16:40 GMT 2024

Powered by FUDForum. Page generated in 0.01534 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top