[openstack-dev] [oslo][oslo.db] MySQL Cluster support

Octave J. Orgeron octave.orgeron at oracle.com
Fri Feb 3 16:59:01 UTC 2017

Hi Mike,

Comments below..


On 2/3/2017 7:41 AM, Mike Bayer wrote:
> On 02/02/2017 05:28 PM, Octave J. Orgeron wrote:
>> That refers to the total length of the row. InnoDB has a limit of 65k
>> and NDB is limited to 14k.
>> A simple example would be the volumes table in Cinder where the row
>> length goes beyond 14k. So in the IF logic block, I change columns types
>> that are vastly oversized such as status and attach_status, which by
>> default are 255 chars.
> let me give you a tip on IF blocks, that they are a bit of an 
> anti-pattern.  If you want a column type to do one thing in one case, 
> and another in another case, create an object that does the thing you 
> want:
> some_table = Table(
>     'some_table', metadata,
>     Column('my_column', VARCHAR(255).with_variant(VARCHAR(50), 'ndb'))
> )
> I think we might want to look into creating a stub dialect called 
> 'ndb' that subclasses mysql+pymysql.   Treating ndb as a whole 
> different database means there's no longer the need for a flag in 
> oslo.db, the 'ndb' name would instead be interpreted as a new backend 
> - the main thing would be ensuring all the mysql-appropriate hooks in 
> oslo.db are also emitted for ndb, but this also gives us a way to pick 
> and choose which hooks apply. It seems like there may be enough 
> different about it to separate it at this level.
> Not sure if people on the list are seeing that we are simultaneously 
> talking about getting rid of Postgresql in the efforts to support only 
> "one database", while at the same time adding one that is in many ways 
> a new database.

This is an interesting approach as it would significantly reduce the 
amount of code in my patches today. Do you have any pointers on where 
this should be implemented as a stub? Would we have to take different 
approaches for SQL Alchemy vs. Alembic?


Oracle <http://www.oracle.com/>
Octave J. Orgeron | Sr. Principal Architect and Software Engineer
Oracle Linux OpenStack
Mobile: +1-720-616-1550 <tel:+17206161550>
500 Eldorado Blvd. | Broomfield, CO 80021
Certified Oracle Enterprise Architect: Systems Infrastructure 
Green Oracle <http://www.oracle.com/commitment> Oracle is committed to 
developing practices and products that help protect the environment

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20170203/67dd9cc8/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: oracle_sig_logo.gif
Type: image/gif
Size: 658 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20170203/67dd9cc8/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: oea_logo.jpg
Type: image/jpeg
Size: 2398 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20170203/67dd9cc8/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: green-for-email-sig_0.gif
Type: image/gif
Size: 356 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20170203/67dd9cc8/attachment-0001.gif>

More information about the OpenStack-dev mailing list