Skip to main content



      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 15:38 Go to next message
Eclipse UserFriend
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 04:31 Go to previous messageGo to next message
Eclipse UserFriend
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 06:29 Go to previous message
Eclipse UserFriend
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: Wed Jul 23 01:45:51 EDT 2025

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

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

Back to the top