hive icon indicating copy to clipboard operation
hive copied to clipboard

HIVE-17306: Support MySQL InnoDB Cluster

Open KiranVelumuri opened this issue 1 year ago • 10 comments

What changes were proposed in this pull request?

Introduce primary key columns to support HA for MySQL cluster. This works for MySQL 8.0.23 and above.

Why are the changes needed?

HIVE-17306

Does this PR introduce any user-facing change?

No

Is the change a dependency upgrade?

No

How was this patch tested?

Perform schema upgrade and verify transactions are working fine, and the meta tables are getting updated as earlier.

KiranVelumuri avatar Feb 12 '25 04:02 KiranVelumuri

@zabetak @okumin Could you please help to review? Thank you.

KiranVelumuri avatar Mar 16 '25 13:03 KiranVelumuri

image

Ref: https://www.trevorlasn.com/blog/invisible-columns-in-sql

KiranVelumuri avatar Mar 21 '25 11:03 KiranVelumuri

@chinnaraolalam @deniskuzZ @abstractdog @zhangbutao @wecharyu @dengzhhu653 Could you please help to review? Thank you.

KiranVelumuri avatar Apr 07 '25 17:04 KiranVelumuri

@KiranVelumuri, I don't understand what it solves or why you are changing the schema for all the supported DBs.

deniskuzZ avatar Apr 08 '25 07:04 deniskuzZ

@deniskuzZ To implement High Availability (HA) for MySQL using the InnoDB cluster, it is a requirement that primary keys be present for all the tables. So, this PR is for adding primary keys to all such tables in Hive's schema which do not have a primary key defined. For the case of tables which cannot have unique primary keys, I added additional invisible column.

KiranVelumuri avatar Apr 08 '25 07:04 KiranVelumuri

@KiranVelumuri thanks for the explanation. It duplicates partially https://github.com/apache/hive/pull/3214 cc @kovjanos

deniskuzZ avatar May 09 '25 18:05 deniskuzZ

@KiranVelumuri Is all the supported DB's support invisible columns. Even though if syntax supports what test are performed to confirm this.

chinnaraolalam avatar May 16 '25 04:05 chinnaraolalam

@KiranVelumuri Is all the supported DB's support invisible columns. Even though if syntax supports what test are performed to confirm this.

Not all DBs support invisible columns. Please refer to my earlier comment. We have Docker tests in our Jenkins that validate fresh install and upgrade scenarios, which have all passed.

KiranVelumuri avatar May 16 '25 05:05 KiranVelumuri

I am not sure if we can accept these changes. Looping HMS folks: @saihemanth-cloudera, @dengzhhu653

deniskuzZ avatar Jun 09 '25 13:06 deniskuzZ

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Feel free to reach out on the [email protected] list if the patch is in need of reviews.

github-actions[bot] avatar Sep 21 '25 00:09 github-actions[bot]