[openstack-dev] [nova][db] Thoughts on making instances.uuid non-nullable?

Joe Gordon joe.gordon0 at gmail.com
Mon Mar 10 19:23:01 UTC 2014


On Mon, Mar 10, 2014 at 12:12 PM, Boris Pavlovic <bpavlovic at mirantis.com> wrote:
> Joe,
>
> Fully agree. We should just make a blueprint "Get rid of soft deletion". So
> we will get much better performance of DB + cleaner code, and avoid such
> things like shadow tables and DB purge scripts.

++

>
> Probably we should some other thread to cover this topic?

++

>
>
> Best regards,
> Boris Pavlovic
>
>
> On Mon, Mar 10, 2014 at 10:57 PM, Joe Gordon <joe.gordon0 at gmail.com> wrote:
>>
>> On Mon, Mar 10, 2014 at 7:11 AM, Matt Riedemann
>> <mriedem at linux.vnet.ibm.com> wrote:
>> >
>> >
>> > On 3/9/2014 9:18 PM, Jay Pipes wrote:
>> >>
>> >> On Mon, 2014-03-10 at 10:05 +0800, ChangBo Guo wrote:
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> 2014-03-10 4:47 GMT+08:00 Jay Pipes <jaypipes at gmail.com>:
>> >>>
>> >>>
>> >>>          > 3. This would make the instances and shadow_instances
>> >>> tables
>> >>>          have
>> >>>          > different schemas, i.e. instances.uuid would be
>> >>>          nullable=False in
>> >>>          > instances but nullable=True in shadow_instances.  Maybe
>> >>> this
>> >>>          doesn't matter.
>> >>>
>> >>>
>> >>>          No, I don't think this matters much, to be honest. I'm not
>> >>>          entirely sure
>> >>>          what the long-term purpose of the shadow tables are in Nova
>> >>> --
>> >>>          perhaps
>> >>>          someone could clue me in to whether the plan is to keep them
>> >>>          around?
>> >>>
>> >>>
>> >>> As I know the tables shadow_*  are used  by command ' nova-manage db
>> >>> archive_deleted_rows' , which moves  records with "deleted=True" to
>> >>> table shadow_* . That means these tables are used by other  process,
>> >>> So, I think we need other tables to store the old records in your
>> >>> migration.
>> >>
>> >>
>> >> Yeah, that's what I understood the shadow tables were used for, I just
>> >> didn't know what the long-term future of these tables was... curious if
>> >> there's been any discussion about that.
>> >>
>> >> Best,
>> >> -jay
>> >>
>> >>
>> >>
>> >> _______________________________________________
>> >> OpenStack-dev mailing list
>> >> OpenStack-dev at lists.openstack.org
>> >> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>> >>
>> >
>> > I think Joe Gordon was working on something in the hopes of eventually
>> > killing the shadow tables but I can't remember exactly what that was
>> > now.
>>
>> I haven't been working on this but I do have a plan.
>>
>> Originally we couldn't hard delete anything in nova DB, because people
>> wanted to keep the records around for well record keeping. The long
>> term solution is make nova support (although not default to) hard
>> delete. This means we need another place to store these records
>> (ceilometer). Until then, we have shadow tables as a short term
>> solution. If you want to keep records around but don't want them in
>> your main nova DB.
>>
>> On a related note, nothing in nova should actually be using soft
>> deleted data or shadow tables, any cases should be treated as bugs.
>>
>>
>>
>> >
>> > --
>> >
>> > Thanks,
>> >
>> > Matt Riedemann
>> >
>> >
>> >
>> > _______________________________________________
>> > OpenStack-dev mailing list
>> > OpenStack-dev at lists.openstack.org
>> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>> _______________________________________________
>> OpenStack-dev mailing list
>> OpenStack-dev at lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>



More information about the OpenStack-dev mailing list