spring-cloud / spring-cloud-dataflow

A microservices-based Streaming and Batch data processing in Cloud Foundry and Kubernetes
https://dataflow.spring.io
Apache License 2.0
1.12k stars 583 forks source link

SCDF does not work with Percona cluster #4277

Open pivotal-james-larrea opened 3 years ago

pivotal-james-larrea commented 3 years ago

When attempting to create a SCDF service instance with a HA Percona cluster I see the following error:

here not exists(select * from hibernate_sequence)]; SQL state [HY000]; error code [1105]; (conn=19) Percona-XtraDB-Cluster prohibits use of DML command on a table (service_instance_db.hibernate_sequence) without an explicit primary key with pxc_strict_mode = ENFORCING or MASTER; nested exception is java.sql.SQLException: (conn=19) Percona-XtraDB-Cluster prohibits use of DML command on a table (service_instance_db.hibernate_sequence) without an explicit primary key with pxc_strict_mode = ENFORCING or MASTER

It looks like hibernate_sequence table needs a primary key.

jvalkeal commented 3 years ago

There's an old issue https://hibernate.atlassian.net/browse/HHH-11923 which never got any traction and that's a reason why we used what hibernate tries to use if you let it create things automatically. Quickly tried adding primary key as we control sql's and it didn't seem to cause any issues.

Should be safe to just modify dataflow/skipper V1 schema as it would then get picked up by fresh schema creation.