Re: [openstack-dev] [oslo.db] Proposal: Get rid of deleted column

2013-08-20 Thread Vishvananda Ishaya
On Aug 20, 2013, at 4:15 PM, Mike Perez wrote: > On Tue, Aug 20, 2013 at 2:52 PM, Vishvananda Ishaya > wrote: > > On Aug 20, 2013, at 2:44 PM, Mike Perez wrote: >> For #1 and #2, really this sounds like another thing doing this along with >> Ceilometer. I would really like to leave this in

Re: [openstack-dev] [oslo.db] Proposal: Get rid of deleted column

2013-08-20 Thread Chris Behrens
On Aug 20, 2013, at 3:29 PM, Vishvananda Ishaya wrote: >>> c) is going ot take a while. There are still quite a few places in nova, >>> for example, that depend on accessing deleted records. >> >> Do you have a list of these places? > > No. I believe Joe Gordon did an initial look long ago. Of

Re: [openstack-dev] [oslo.db] Proposal: Get rid of deleted column

2013-08-20 Thread Mike Perez
On Tue, Aug 20, 2013 at 2:52 PM, Vishvananda Ishaya wrote: > > On Aug 20, 2013, at 2:44 PM, Mike Perez wrote: > > For #1 and #2, really this sounds like another thing doing this along with > Ceilometer. I would really like to leave this in Ceilometer and not have > each project get more complex i

Re: [openstack-dev] [oslo.db] Proposal: Get rid of deleted column

2013-08-20 Thread Vishvananda Ishaya
On Aug 20, 2013, at 3:27 PM, Jay Pipes wrote: > On 08/20/2013 05:52 PM, Vishvananda Ishaya wrote: >> >> On Aug 20, 2013, at 2:44 PM, Mike Perez > > wrote: >> >>> On Tue, Aug 20, 2013 at 1:59 PM, Jay Pipes >> > wrote: >>> >>> >>>We shou

Re: [openstack-dev] [oslo.db] Proposal: Get rid of deleted column

2013-08-20 Thread Vishvananda Ishaya
On Aug 20, 2013, at 3:16 PM, Jay Pipes wrote: > On 08/20/2013 05:52 PM, Vishvananda Ishaya wrote: >> >> On Aug 20, 2013, at 2:44 PM, Mike Perez > > wrote: >> >>> On Tue, Aug 20, 2013 at 1:59 PM, Jay Pipes >> > wrote: >>> >>> >>>We shou

Re: [openstack-dev] [oslo.db] Proposal: Get rid of deleted column

2013-08-20 Thread Jay Pipes
On 08/20/2013 05:52 PM, Vishvananda Ishaya wrote: On Aug 20, 2013, at 2:44 PM, Mike Perez mailto:thin...@gmail.com>> wrote: On Tue, Aug 20, 2013 at 1:59 PM, Jay Pipes mailto:jaypi...@gmail.com>> wrote: We should take a look at look at the various entities in the various database sche

Re: [openstack-dev] [oslo.db] Proposal: Get rid of deleted column

2013-08-20 Thread Jay Pipes
On 08/20/2013 05:52 PM, Vishvananda Ishaya wrote: On Aug 20, 2013, at 2:44 PM, Mike Perez mailto:thin...@gmail.com>> wrote: On Tue, Aug 20, 2013 at 1:59 PM, Jay Pipes mailto:jaypi...@gmail.com>> wrote: We should take a look at look at the various entities in the various database sche

Re: [openstack-dev] [oslo.db] Proposal: Get rid of deleted column

2013-08-20 Thread Vishvananda Ishaya
On Aug 20, 2013, at 2:44 PM, Mike Perez wrote: > On Tue, Aug 20, 2013 at 1:59 PM, Jay Pipes wrote: > > We should take a look at look at the various entities in the various database > schemata and ask the following questions: > > 1) Do we care about archival of the entity? > > 2) Do we care

Re: [openstack-dev] [oslo.db] Proposal: Get rid of deleted column

2013-08-20 Thread Mike Perez
On Tue, Aug 20, 2013 at 1:59 PM, Jay Pipes wrote: > > We should take a look at look at the various entities in the various > database schemata and ask the following questions: > > 1) Do we care about archival of the entity? > > 2) Do we care about audit history of changes to the entity? > For #1

Re: [openstack-dev] [oslo.db] Proposal: Get rid of deleted column

2013-08-20 Thread Jay Pipes
On 08/20/2013 04:16 PM, Chris Behrens wrote: On Aug 20, 2013, at 1:05 PM, Jay Pipes wrote: I see the following use case: 1) Create something with a unique name within your tenant 2) Delete that 3) Create something with the same unique name immediately after As a pointless and silly use case

Re: [openstack-dev] [oslo.db] Proposal: Get rid of deleted column

2013-08-20 Thread Chris Behrens
On Aug 20, 2013, at 1:05 PM, Jay Pipes wrote: > I see the following use case: > > 1) Create something with a unique name within your tenant > 2) Delete that > 3) Create something with the same unique name immediately after > > As a pointless and silly use case that we should not cater to. > >

Re: [openstack-dev] [oslo.db] Proposal: Get rid of deleted column

2013-08-20 Thread Chris Behrens
On Aug 20, 2013, at 12:51 PM, Ed Leafe wrote: > On Aug 20, 2013, at 2:33 PM, Chris Behrens > wrote: > >> For instances table, we want to make sure 'uuid' is unique. But we can't >> put a unique constraint on that alone. If that instance gets deleted.. we >> should be able to create another

Re: [openstack-dev] [oslo.db] Proposal: Get rid of deleted column

2013-08-20 Thread Jay Pipes
I see the following use case: 1) Create something with a unique name within your tenant 2) Delete that 3) Create something with the same unique name immediately after As a pointless and silly use case that we should not cater to. It's made the database schema needlessly complex IMO and added co

Re: [openstack-dev] [oslo.db] Proposal: Get rid of deleted column

2013-08-20 Thread Ed Leafe
On Aug 20, 2013, at 2:33 PM, Chris Behrens wrote: > For instances table, we want to make sure 'uuid' is unique. But we can't put > a unique constraint on that alone. If that instance gets deleted.. we should > be able to create another entry with the same uuid without a problem. So we > nee

Re: [openstack-dev] [oslo.db] Proposal: Get rid of deleted column

2013-08-20 Thread Chris Behrens
This is kind of a stupid example, but it makes the point: For instances table, we want to make sure 'uuid' is unique. But we can't put a unique constraint on that alone. If that instance gets deleted.. we should be able to create another entry with the same uuid without a problem. So we need

Re: [openstack-dev] [oslo.db] Proposal: Get rid of deleted column

2013-08-20 Thread Boris Pavlovic
Jay, Don't worry I investigate this question very well. There are actually two approaches: 1) Use deleted_at to create Unique Constraints. But then we are not able to store in deleted_at NONE value, because it won't work e.g. We have table for Users (user_name, deleted_at, deleted), and we won't

Re: [openstack-dev] [oslo.db] Proposal: Get rid of deleted column

2013-08-20 Thread Jay Pipes
*sigh* I wish I'd been aware of these conversations and been in the Grizzly summit session on soft delete... What specific unique constraint was needed that changing the deleted column to use the id value solved? -jay On 08/19/2013 03:56 AM, Chris Behrens wrote: 'deleted' is used so that we

Re: [openstack-dev] [oslo.db] Proposal: Get rid of deleted column

2013-08-19 Thread Julien Danjou
On Mon, Aug 19 2013, Jay Pipes wrote: > Thoughts? +1 -- Julien Danjou ;; Free Software hacker ; freelance consultant ;; http://julien.danjou.info signature.asc Description: PGP signature ___ OpenStack-dev mailing list OpenStack-dev@lists.openstack.o

Re: [openstack-dev] [oslo.db] Proposal: Get rid of deleted column

2013-08-19 Thread Boris Pavlovic
Hi Jay, When I started working around unique keys, I tried to use deleted_at column. so answer about why we don't use deleted_at column you could read in Devananda's comment on my patch https://review.openstack.org/#/c/16162/ . Also I should mention that this is really huge change and it will ta

Re: [openstack-dev] [oslo.db] Proposal: Get rid of deleted column

2013-08-19 Thread Chris Behrens
'deleted' is used so that we can have proper unique constraints by setting it to `id` on deletion. This was not the case until Grizzly, and before Grizzly I would have agreed completely. - Chris On Aug 19, 2013, at 12:39 AM, Jay Pipes wrote: > I'm throwing this up here to get some feedback o