Bug 1207575 - Zanata still creates MyISAM (not InnoDB) tables in some cases
Summary: Zanata still creates MyISAM (not InnoDB) tables in some cases
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Zanata
Classification: Retired
Component: DatabaseChange, Performance
Version: 3.6
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 3.7
Assignee: Sean Flanigan
QA Contact: Damian Jansen
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-31 08:48 UTC by Sean Flanigan
Modified: 2015-07-22 02:19 UTC (History)
2 users (show)

Fixed In Version: 3.7.0-SNAPSHOT
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-07-22 02:19:35 UTC


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1017458 0 unspecified CLOSED Intermittent OptimisticLockException on set project validation options 2021-02-22 00:41:40 UTC

Internal Links: 1017458

Description Sean Flanigan 2015-03-31 08:48:07 UTC
Description of problem:

The file db.changelog-1.0.xml includes a couple of changesets which attempt to prevent Zanata from creating MyISAM tables by accident, but they don't seem to be working in all cases (recent versions of mysql?).  Since Zanata is supposed to be using InnoDB, this can lead to all sorts of transaction consistency and performance bugs.

This sql can be used to show the MyISAM tables in a schema:
  SELECT TABLE_NAME FROM information_schema.TABLES WHERE ENGINE='MyISAM' and TABLE_SCHEMA='zanata';

On my machine with a fairly recent production backup (March 2015), multiple tables are showing as MyISAM:

	Activity
	DATABASECHANGELOG
	DATABASECHANGELOGLOCK
	HAccountOption
	HDocumentUpload
	HDocumentUploadPart
	HDocument_RawDocument
	HPersonEmailValidationKey
	HProjectIteration_Validation
	HProject_Validation
	HRawDocument
	HRoleAssignmentRule
	HTextFlowTargetReviewComment
	IterationGroup_Locale
	TransMemory
	TransMemoryUnit
	TransMemoryUnitVariant
	TransMemory_Metadata

I think we need to revisit the way we ensure tables are created as InnoDB in Liquibase.  One option is modifySql: http://www.liquibase.org/documentation/modify_sql.html  A cleaner solution is probably a custom CreateTableGenerator, as suggested here: http://blog.liquibase.org/2011/01/liquibase-2-0-officially-released.html

We also need to run another changeset to convert any potentially affected tables to InnoDB.  See the original fix for an example of this: https://github.com/zanata/zanata-server/commit/45d8e57e7476a1146e72abea0011f657555cbb75

Comment 1 Sean Flanigan 2015-04-13 06:16:40 UTC
Pull request: https://github.com/zanata/zanata-server/pull/773

Comment 2 Damian Jansen 2015-05-12 05:20:06 UTC
Verified (master) at c36663118b0fb358c8b1cd048014e14788dd6c5c


Note You need to log in before you can comment on or make changes to this bug.