embulk / embulk-output-jdbc

MySQL, PostgreSQL, Redshift and generic JDBC output plugins for Embulk
Other
88 stars 86 forks source link

Key duplication occurs when embulk-output-mysql retries #252

Closed hito4t closed 5 years ago

hito4t commented 5 years ago

embulk-output-mysql will retry when deadlock occurs. But sometimes key duplication error will occur. If number of records to load is large, some records will be committed even if deadlock occurs. So key duplication will occur when embulk-output-mysql retries to load all records.

This is the bug of the PR #251 .

hito4t commented 5 years ago

Values of Statement#executeBatch when succeeded :

Values of BatchUpdateException#getUpdateCounts when deadlock occurs :

Values of Statement#executeBatch when succeeded :

Values of BatchUpdateException#getUpdateCounts when deadlock occurs (many records) :