Not the answer you need?
Register and ask your own question!

Schema change with manual RSU possible issues?

giomandagiomanda ContributorInactive User Role Beginner
I have a setup with three percona cluster servers. I a doing some tests with online schema changes and i have a question regarding what happens when you drop a column on a schema change as this method requires the old/new schema change to be backwards compatible.

Assuming we have:

ServerA: Receives all traffic
ServerB: Synced
ServerC: Synced

You take out ServerC see from cluster, change OSU method to RSU, and you drop the column "comments" from "table1".
ServerC has any activities performed by the rest of the cluster cached in galera.cache. So when ServerC is brought back to cluster it will start executing the activity cached.

At this point, ServerA receives an insert to table "table1" which also inserts information in column "comments"

Now, when we add ServerC back to cluster, it will try to perform the above insert (since it is cached) in order to get synced with the rest of the cluster. Wouldn’t the above insert fail? I mean it will try to insert on a column that does not exists, right?

How can your schema be backwards compatible when you actually drop a column on the new schema?

Comments

  • przemekprzemek Percona Support Engineer Percona Staff Role
    A schema change is considered to be backwards compatible when you for example add/drop secondary indexes. It is NOT when you add/drop columns or change their datatype.
    So in this case, you may use either TOI method or just make sure nothing writes to the table during the change schema process. If any write happens when a node has incompatible table schema - this node will abort with data consistency error.
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.