Skip to content

Added the 'write_timeout' option. #4381

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

Closed
gujun4990 opened this issue Nov 28, 2018 · 4 comments
Closed

Added the 'write_timeout' option. #4381

gujun4990 opened this issue Nov 28, 2018 · 4 comments
Labels
easy a one / two liner type of thing that anyone can do in short order. also see "fairly easy" feature mysql
Milestone

Comments

@gujun4990
Copy link

gujun4990 commented Nov 28, 2018

Hello, I run OpenStack project and use sqlalchemy to connect mysql database. I know I can configure read_timeout option for connection url. But can't configure write_timeout option. So I read the sqlalchemy code and MySQLdb code. I found that MySQLdb 1.2.5 can support read_timeout and write_timeout option. But the sqlalchemy just support read_timeout option. So I think sqlalchemy also should support write_timeout option. If OK, I will create a PR to add write_timeout option.

sqlalchemy-bot pushed a commit that referenced this issue Nov 28, 2018
This is to assist with #4381.

Change-Id: I5ebfc0da906a13edc4fb3f0ca7ab2d843d43bb00
sqlalchemy-bot pushed a commit that referenced this issue Nov 28, 2018
This is to assist with #4381.

Change-Id: I5ebfc0da906a13edc4fb3f0ca7ab2d843d43bb00
(cherry picked from commit 6837e87)
@zzzeek
Copy link
Member

zzzeek commented Nov 28, 2018

to be clear, you need "write_timeout" to have integer coercion for the URL, that is, "mysql+mysqldb://..../?write_timeout=30". Because you're using openstack you are going through oslo.db so you don't have an easy way to add connect_args={'write_timeout': 50}.

I've added a test harness for these arguments in 6837e87. you can provide a PR adding to that.

@zzzeek zzzeek added this to the 1.2.x milestone Nov 28, 2018
@zzzeek zzzeek added the easy a one / two liner type of thing that anyone can do in short order. also see "fairly easy" label Nov 28, 2018
@gujun4990
Copy link
Author

OK, I have provided a PR to add the write_timeout option. Please review it. Thank you!

@sqlalchemy-bot
Copy link
Collaborator

jun923.gu has proposed a fix for this issue:

Add the write_timeout option for mysql. https://gerrit.sqlalchemy.org/989

@sqlalchemy-bot
Copy link
Collaborator

jun923.gu has proposed a fix for this issue:

Add the write_timeout option for mysql. https://gerrit.sqlalchemy.org/990

sqlalchemy-bot pushed a commit that referenced this issue Nov 30, 2018
As MySQLdb support read_timeout and write_timeout option, and
sqlalchemy just support read_timeout option. So sqlalchemy need to add
write_timeout option.

Fixes: #4381
Change-Id: I2bea80bdd6f20fafc72b48fa0e5d795626d9d9b9
Pull-request: #4385
(cherry picked from commit 6a8454d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy a one / two liner type of thing that anyone can do in short order. also see "fairly easy" feature mysql
Projects
None yet
Development

No branches or pull requests

3 participants