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

Start using Contexts for database access #2819

Closed
jsha opened this issue Jun 20, 2017 · 3 comments
Closed

Start using Contexts for database access #2819

jsha opened this issue Jun 20, 2017 · 3 comments

Comments

@jsha
Copy link
Contributor

jsha commented Jun 20, 2017

Now that go-sql-driver/mysql#608 has been merged, fixing go-sql-driver/mysql#496, we can start passing along our RPC contexts to the database layer. This will improve our load shedding, since we will avoid sending queries for which the RPC timeout has already expired.

Since we use Gorp as a middle layer for our database access, we will need support for contexts to be implemented there.

@kf6nux
Copy link
Contributor

kf6nux commented Oct 2, 2017

Gorp merged go-gorp/gorp#352 which adds context support.

rolandshoemaker pushed a commit that referenced this issue Oct 19, 2018
$ GORP_TEST_DIALECT=gomysql \
  GORP_TEST_DSN="root@tcp(10.77.77.2:3306)/boulder_sa_integration" \
  go test gopkg.in/go-gorp/gorp.v2
ok      gopkg.in/go-gorp/gorp.v2        24.283s

Fixes #3890 
Fixes #3488 
Part of #2819
@jsha
Copy link
Contributor Author

jsha commented Oct 23, 2018

We've now vendored the version of Gorp we need for this, so it's a matter of plumbing through the context in the various calls we need.

@jsha jsha added this to the Sprint 2018-10-23 milestone Oct 23, 2018
@jsha jsha self-assigned this Oct 23, 2018
@jsha
Copy link
Contributor Author

jsha commented Nov 6, 2018

I'm considering this done for now. There are some places that use the DB but don't currently have contexts, like ocsp-updater, admin-revoker, and so on. But I don't think they currently need them.

@jsha jsha closed this as completed Nov 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants