Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support settable value of socket timeout in mysql #193

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ykoyano
Copy link

@ykoyano ykoyano commented Aug 13, 2017

This PR will fix #192.
I would like you to review my code.

@hito4t
Copy link
Contributor

hito4t commented Aug 16, 2017

@ykoyano
Thank you for the PR!

As you know, embulk-output-jdbc sets different timeout value depending on retryableMetadataOperation.

retryableMetadataOperation is true in

  • AbstractJdbcOutputPlugin#open -> INSERT statement will be executed (each statement will insert only one record, but multiple statements will be executed as batch)
  • AbstractJdbcOutputPlugin#begin -> CREATE statement will be executed
  • AbstractJdbcOutputPlugin#cleanup -> DROP statement will be executed

retryableMetadataOperation is false in

  • AbstractJdbcOutputPlugin#commit -> COMMIT, INSERT statement will be executed (the INSERT statement will insert all records in intermediate tables)

Essentially, timeout for retryableMetadataOperation = true doesn't need to be large because DDL shouldn't take long time.
I think retryableMetadataOperation for AbstractJdbcOutputPlugin#open should be false because it will execute DML.

Would you tell me where the timeout occurred?
(I'd like to see stack trace for timeout exception.)

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

Successfully merging this pull request may close these issues.

[mysql] Can not user selected value for socket timeout
2 participants