Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Delete values from version history(Deleting values from the version history to conserve space)
[CDO] Delete values from version history [message #1412244] Mon, 25 August 2014 16:53 Go to next message
Ruben Faelens is currently offline Ruben FaelensFriend
Messages: 2
Registered: August 2014
Junior Member
I am using a versioned CDO database, and everything is working marvelous.

In the database, we store mathematical models. We also store simulation definitions and simulation results, which can often become very large (50Mb or more). The model should be versioned, but the simulation results can be deleted after the Simulation object is deleted (as they can become very large).

Is there an easy way to modify the CDO version history, so that the results are completely removed (both from the Current version and from the history)? Or should I really set up two datastores (one versioned and one unversioned)?
Re: [CDO] Delete values from version history [message #1412443 is a reply to message #1412244] Tue, 26 August 2014 07:11 Go to previous messageGo to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
Hi Ruben,

You cannot remove old CDORevisions from the server's store without
breaking data's integrity because CDO expect to have these previous
CDORevisions when auditing is enabled.
Then I think having 2 datastores, one with auditing and another without
is a good solution.

Best Regards.

Le 25/08/2014 19:00, Ruben Faelens a écrit :
> I am using a versioned CDO database, and everything is working marvelous.
>
> In the database, we store mathematical models. We also store simulation
> definitions and simulation results, which can often become very large
> (50Mb or more). The model should be versioned, but the simulation
> results can be deleted after the Simulation object is deleted (as they
> can become very large).
>
> Is there an easy way to modify the CDO version history, so that the
> results are completely removed (both from the Current version and from
> the history)? Or should I really set up two datastores (one versioned
> and one unversioned)?


--
Esteban Dugueperoux - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: [CDO] Delete values from version history [message #1412612 is a reply to message #1412443] Tue, 26 August 2014 15:39 Go to previous messageGo to next message
Ruben Faelens is currently offline Ruben FaelensFriend
Messages: 2
Registered: August 2014
Junior Member
Thank you for the explanation.

I would be happy if I could just NULL the 'contents' feature of my CDOObject. That could be done with a simple SQL query:
UPDATE SimulationOutput SET output='' WHERE cdoId IN (SELECT cdoId FROM SimulationOutput WHERE deleted=TRUE) 
(pseudo-code)

Another option would be to never store this specific feature in the DB. Would this be another way? Immediately splitting my model over two repositories and requiring XA Transactions seems like a lot of refactoring...
Re: [CDO] Delete values from version history [message #1412794 is a reply to message #1412612] Wed, 27 August 2014 04:44 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6441
Registered: July 2009
Senior Member
Am 26.08.2014 um 17:39 schrieb Ruben Faelens:
> Thank you for the explanation.
>
> I would be happy if I could just NULL the 'contents' feature of my CDOObject. That could be done with a simple SQL query:
> UPDATE SimulationOutput SET output='' WHERE cdoId IN (SELECT cdoId FROM SimulationOutput WHERE deleted=TRUE)
> (pseudo-code)
If you're absolutely sure that no other object (that doesn't get deleted at the same time) refers to the deleted objects
(at any time) it seems okay to me. Otherwise Esteban's suggestion is a little cleaner but probably not much safer
because referential integrity is not enforced for CDO's external references either.

>
> Another option would be to never store this specific feature in the DB. Would this be another way?
Of course you can set the respective features in your model to transient or add a CDO-specific annotation to set CDO
transient-ness independent of EMF's standard property.

> Immediately splitting my model over two repositories and requiring XA Transactions seems like a lot of refactoring...
I guess that would make more sense if atomicity isn't strictly needed across the repos.

Cheers
/Eike

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


Previous Topic:DelegatingWrapperItemProvider : how change the order of the properties
Next Topic:Custon type in <xs:list>
Goto Forum:
  


Current Time: Mon Aug 19 23:04:32 GMT 2019

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

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

Back to the top