MyISAM not supported by Pivotal Cloud Foundry MySQL #262

Closed
cppwfs opened this Issue Jan 6, 2017 · 3 comments

Projects

None yet

4 participants

@cppwfs
Contributor
cppwfs commented Jan 6, 2017 edited

Currently a user can not use Spring Cloud Task using the p-mysql nor MySql for PCF because they do not include the MyISAM Engine.

Background: In order to create a sequence number, Spring Cloud Task uses the MySQLMaxValueIncrementer which requires a sequence table to be created. Based on the documentation provided we must set the engine to MYISAM. This is so that sequences can be allocated without regard to transactions. Docs can be found here: "http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/jdbc/support/incrementer/MySQLMaxValueIncrementer.html"

Problem: Based on the commit here: cloudfoundry/cf-mysql-release@e6100e7
MySQL PCF does not include the MYISAM engine. This is because the Galera plugin does not support the replication of MYISAM tables. https://docs.pivotal.io/p-mysql/1-8/known-issues.html#myisam

With this we have 3 options:

  1. Ask the MySQL to include the MYISAM again. And wait for updates
  2. Implement our own DataFieldMaxValueIncrementer
  3. Change the engine to INNODB and let folks know that it will be sensitive to transactions and refer them to use ClearDB (if on PWS) or Postgres.

Reproducible on pcfdev-v0.23.0 and the current implementation on PWS.

This will also affect Spring Batch.

@cppwfs cppwfs added bug help wanted and removed help wanted labels Jan 6, 2017
@cppwfs
Contributor
cppwfs commented Jan 6, 2017 edited

Just checked the schema for batch. it uses InnoDB. i.e. https://github.com/spring-projects/spring-batch/blob/master/spring-batch-core/src/main/resources/org/springframework/batch/core/schema-mysql.sql#L83

Should we just convert to that? Especially since MYISAM tables can't be replicated across the cluster

@markpollack
Contributor

Can we track down what version of the tile made this change? Honestly, this is a pretty big breaking change not just for SCDF, but all users of the mysql tile.

@cppwfs cppwfs added the in progress label Jan 6, 2017
@cppwfs cppwfs self-assigned this Jan 6, 2017
@cppwfs cppwfs added a commit to cppwfs/spring-cloud-task that referenced this issue Jan 6, 2017
@cppwfs cppwfs Change Engine for sequence to InnoDB
resolves #262
a575a38
@cppwfs cppwfs added in pr and removed in progress labels Jan 6, 2017
@mminella mminella added a commit that closed this issue Jan 6, 2017
@cppwfs @mminella cppwfs + mminella Change Engine for sequence to InnoDB
resolves #262
91aaf00
@mminella mminella closed this in 91aaf00 Jan 6, 2017
@mminella mminella removed the in pr label Jan 6, 2017
@mminella mminella added a commit that referenced this issue Jan 6, 2017
@cppwfs @mminella cppwfs + mminella Change Engine for sequence to InnoDB
resolves #262
abd5db6
@trisberg
Contributor
trisberg commented Jan 6, 2017

I've created an issue in Spring Framework to allow us to use non MYISAM tables for the sequence table. Issue is here: https://jira.spring.io/browse/SPR-15107 and PR: spring-projects/spring-framework#1286

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment