Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Delete objects completely from database (turn off versioning)
[CDO] Delete objects completely from database (turn off versioning) [message #533018] Tue, 11 May 2010 21:35 Go to next message
Kai Schlamp is currently offline Kai SchlampFriend
Messages: 344
Registered: July 2009
Senior Member
Hi.

When I remove objects from a list that is backed up by CDO, the object are not really deleted in the database. It is just not visible anymore when accessing the list and in the database "version" is changed to "-2". I don't need the versioning stuff. I need the objects completely removed from the database. This was done by default in an older release. How do I enable it again (resp. disable the versioning? I already set Props.SUPPORTING_AUDITS and Props.SUPPORTING_BRANCHES to "false". I am using DBStore + H2 database with CDO.

Regards,
Kai
Re: [CDO] Delete objects completely from database (turn off versioning) [message #533049 is a reply to message #533018] Wed, 12 May 2010 06:27 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Kai,

Generally these negative versions have been introduced to DBStore while
we added branching support. With branching enabled there is an important
difference between an object having no revision *yet* in a branch versus
an object having no revision *anymore* in a branch. In the first case
the framework must consult the baseline of the branch while in the
second case the object has been explicitely deleted in that branch.

While this is important for branching, we realized that there is a
certain impact also on non-branching mode. Without this extra
infromation a client can not know this difference, even though it always
operates on the implicit main branch. I.e. each such object access will
trigger a server round trip just to find out (again) that the object
does not exist (yet or anymore). So it was meant as kind of a protocol
and caching optimization.

If you don't like this feature in non-branching/auditing mode we could
discuss in a bugzilla whether and how we can make that configurable.

Cheers
/Eike

----
http://thegordian.blogspot.com
http://twitter.com/eikestepper



Am 11.05.2010 23:35, schrieb Kai Schlamp:
> Hi.
>
> When I remove objects from a list that is backed up by CDO, the object
> are not really deleted in the database. It is just not visible anymore
> when accessing the list and in the database "version" is changed to
> "-2". I don't need the versioning stuff. I need the objects completely
> removed from the database. This was done by default in an older
> release. How do I enable it again (resp. disable the versioning? I
> already set Props.SUPPORTING_AUDITS and Props.SUPPORTING_BRANCHES to
> "false". I am using DBStore + H2 database with CDO.
> Regards,
> Kai


Re: [CDO] Delete objects completely from database (turn off versioning) [message #533125 is a reply to message #533049] Wed, 12 May 2010 10:01 Go to previous messageGo to next message
Victor Roldan Betancort is currently offline Victor Roldan BetancortFriend
Messages: 524
Registered: July 2009
Senior Member
Eike,

wouldn't it be enough to use HorizontalNonAuditMappingStrategy?

Eike Stepper escribió:
> Hi Kai,
>
> Generally these negative versions have been introduced to DBStore while
> we added branching support. With branching enabled there is an important
> difference between an object having no revision *yet* in a branch versus
> an object having no revision *anymore* in a branch. In the first case
> the framework must consult the baseline of the branch while in the
> second case the object has been explicitely deleted in that branch.
>
> While this is important for branching, we realized that there is a
> certain impact also on non-branching mode. Without this extra
> infromation a client can not know this difference, even though it always
> operates on the implicit main branch. I.e. each such object access will
> trigger a server round trip just to find out (again) that the object
> does not exist (yet or anymore). So it was meant as kind of a protocol
> and caching optimization.
>
> If you don't like this feature in non-branching/auditing mode we could
> discuss in a bugzilla whether and how we can make that configurable.
>
> Cheers
> /Eike
>
> ----
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
>
> Am 11.05.2010 23:35, schrieb Kai Schlamp:
>> Hi.
>>
>> When I remove objects from a list that is backed up by CDO, the object
>> are not really deleted in the database. It is just not visible anymore
>> when accessing the list and in the database "version" is changed to
>> "-2". I don't need the versioning stuff. I need the objects completely
>> removed from the database. This was done by default in an older
>> release. How do I enable it again (resp. disable the versioning? I
>> already set Props.SUPPORTING_AUDITS and Props.SUPPORTING_BRANCHES to
>> "false". I am using DBStore + H2 database with CDO.
>> Regards,
>> Kai
Re: [CDO] Delete objects completely from database (turn off versioning) [message #533247 is a reply to message #533125] Wed, 12 May 2010 17:13 Go to previous messageGo to next message
Kai Schlamp is currently offline Kai SchlampFriend
Messages: 344
Registered: July 2009
Senior Member
@Victor: It seems that this is not enough as I create my mapping by using CDODBUtil.createHorizontalMappingStrategy(false).

@Eike: So when do these data entries get deleted in the database? My app has many store and remove operations. So if any removed object stays in the database the database gets very very large over time.
I also query the database directly by using our sql query api. And now it takes additional where clauses to filter out the removed objects as they still exist in the database.

Here is the Bugzilla enhancement request: https://bugs.eclipse.org/bugs/show_bug.cgi?id=312670

Thanks,
Kai

Re: [CDO] Delete objects completely from database (turn off versioning) [message #533305 is a reply to message #533247] Thu, 13 May 2010 06:47 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 12.05.2010 19:13, schrieb Kai Schlamp:
> @Victor: It seems that this is not enough as I create my mapping by
> using CDODBUtil.createHorizontalMappingStrategy(false).
No, it is a (new) "feature" of the HorizontalNonAuditMappingStrategy.

>
> @Eike: So when do these data entries get deleted in the database?
IIRC never.

> My app has many store and remove operations. So if any removed object
> stays in the database the database gets very very large over time.
We'll se in the bugzilla that you've submitted what we can do.

> I also query the database directly by using our sql query api. And now
> it takes additional where clauses to filter out the removed objects as
> they still exist in the database.
That would be acceptable, but the DB size impact should be better
considered by HorizontalNonAuditMappingStrategy.

>
> Here is the Bugzilla enhancement request:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=312670
Thanks!

Cheers
/Eike

----
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Previous Topic:[EMF Validation] Marker resolution for unresolvable references
Next Topic:[CDO] New error "No meta ID mapped ..."
Goto Forum:
  


Current Time: Thu Apr 25 03:31:03 GMT 2024

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

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

Back to the top