Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Recovering from offline mode(Problems merging branch created during offline mode back to main branch)
[CDO] Recovering from offline mode [message #677264] Tue, 07 June 2011 23:36 Go to next message
Steve Robenalt is currently offline Steve RobenaltFriend
Messages: 22
Registered: July 2009
Junior Member
I am working with a prototype for a CDO-based application that is intended to provide transparent recovery from intermittent offline usage. The offline setup is very similar to the OfflineExample in the CDO examples - offline clone repository via Net4J JVM connector, remote repository on the same machine via Net4J TCP connector. Derby database for both offline and master repositories.

Test execution follows the sequence below:

1) Start in online mode.
2) Execute an update to an existing object.
3) Stop the master repository.
4) Execute an update to a different (pre-existing) object - offline branch is created.
5) Restart the master repository.
6) Execute an update to a third existing object - stays on the offline branch.
6a) Following the commit to the offline branch, detect that we are now online and can merge.
7) Create a secondary transaction from the main branch.
Cool Execute a merge on the secondary transaction using the offline branch as the source.
9) Commit the secondary transaction.
10) Return the primary transaction to the main branch.

Step 9 fails due to a concurrent modification of the object in step 2, which was updated prior to the creation of the offline branch, though it was performed using the same CDOTransaction.

The error is reproducible, but regrettably, the test is not currently in JUnit form.

Questions:

A) Is there a simpler way to merge the offline branch back to main, (i.e. without creating a secondary transaction)?
B) Is the offline branch expected to inherit changes that were made prior to its creation by the same transaction?

Any advice is much appreciated.

Steve
Re: [CDO] Recovering from offline mode [message #687157 is a reply to message #677264] Wed, 08 June 2011 07:09 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Steve,

Just the other day I noticed a regression in the offline replication process. Although it does not seem to be related to your issue I'd like to take my last chance to fix that bug for Indigo today. I'll come back to your issue ASAP...

What exact CDO version are you using?

Cheers
/Eike

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


Am 08.06.2011 01:36, schrieb Steve Robenalt:
> I am working with a prototype for a CDO-based application that is intended to provide transparent recovery from intermittent offline usage. The offline setup is very similar to the OfflineExample in the CDO examples - offline clone repository via Net4J JVM connector, remote repository on the same machine via Net4J TCP connector. Derby database for both offline and master repositories.
>
> Test execution follows the sequence below:
>
> 1) Start in online mode.
> 2) Execute an update to an existing object.
> 3) Stop the master repository.
> 4) Execute an update to a different (pre-existing) object - offline branch is created.
> 5) Restart the master repository.
> 6) Execute an update to a third existing object - stays on the offline branch.
> 6a) Following the commit to the offline branch, detect that we are now online and can merge.
> 7) Create a secondary transaction from the main branch.
> 8) Execute a merge on the secondary transaction using the offline branch as the source.
> 9) Commit the secondary transaction.
> 10) Return the primary transaction to the main branch.
>
> Step 9 fails due to a concurrent modification of the object in step 2, which was updated prior to the creation of the offline branch, though it was performed using the same CDOTransaction.
>
> The error is reproducible, but regrettably, the test is not currently in JUnit form.
>
> Questions:
>
> A) Is there a simpler way to merge the offline branch back to main, (i.e. without creating a secondary transaction)?
> B) Is the offline branch expected to inherit changes that were made prior to its creation by the same transaction?
>
> Any advice is much appreciated.
>
> Steve
>


Re: [CDO] Recovering from offline mode [message #687408 is a reply to message #677264] Wed, 08 June 2011 07:09 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Steve,

Just the other day I noticed a regression in the offline replication process. Although it does not seem to be related to your issue I'd like to take my last chance to fix that bug for Indigo today. I'll come back to your issue ASAP...

What exact CDO version are you using?

Cheers
/Eike

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


Am 08.06.2011 01:36, schrieb Steve Robenalt:
> I am working with a prototype for a CDO-based application that is intended to provide transparent recovery from intermittent offline usage. The offline setup is very similar to the OfflineExample in the CDO examples - offline clone repository via Net4J JVM connector, remote repository on the same machine via Net4J TCP connector. Derby database for both offline and master repositories.
>
> Test execution follows the sequence below:
>
> 1) Start in online mode.
> 2) Execute an update to an existing object.
> 3) Stop the master repository.
> 4) Execute an update to a different (pre-existing) object - offline branch is created.
> 5) Restart the master repository.
> 6) Execute an update to a third existing object - stays on the offline branch.
> 6a) Following the commit to the offline branch, detect that we are now online and can merge.
> 7) Create a secondary transaction from the main branch.
> 8) Execute a merge on the secondary transaction using the offline branch as the source.
> 9) Commit the secondary transaction.
> 10) Return the primary transaction to the main branch.
>
> Step 9 fails due to a concurrent modification of the object in step 2, which was updated prior to the creation of the offline branch, though it was performed using the same CDOTransaction.
>
> The error is reproducible, but regrettably, the test is not currently in JUnit form.
>
> Questions:
>
> A) Is there a simpler way to merge the offline branch back to main, (i.e. without creating a secondary transaction)?
> B) Is the offline branch expected to inherit changes that were made prior to its creation by the same transaction?
>
> Any advice is much appreciated.
>
> Steve
>


Re: [CDO] Recovering from offline mode [message #687589 is a reply to message #687408] Wed, 22 June 2011 19:49 Go to previous message
Steve Robenalt is currently offline Steve RobenaltFriend
Messages: 22
Registered: July 2009
Junior Member
Hi Eike,

Sorry to not respond to this post sooner. Believe it or not, your reply just got pushed to my email today. To answer your question regarding the version, the problem was showing on CDO 4.0.0 built 5/23/2011. Following this post, I updated to a version of CDO 4.0.0 dated 6/10/2011 from the Hudson build. Following that update, the merge problems were resolved (mostly, anyway), and I posted a message to that effect on bugzilla - bug #346792, to which you responded.

I am still running the above noted Hudson build, and am experiencing one more problem with the merge that showed up in further testing. I'm having problems with temporary cdo ids assigned during the offline branch. These trigger an IllegalStateException with a note that the branch is frozen. We've found the smoking gun, but are still exploring the conditions under which it happens. It's related to bug #341081, so I'll post updates there.

Thanks,
Steve
Previous Topic:[CDO] Retaining a reference to a model object
Next Topic:[EMF][CDO] Scalability and the recommended use of ItemProviderAdapters when using CDO
Goto Forum:
  


Current Time: Fri Apr 19 06:41:48 GMT 2024

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

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

Back to the top