Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

feat(db): make database fault tolerant of db server #1716

Merged
merged 1 commit into from Mar 17, 2017
Merged

Conversation

seanmonstar
Copy link
Contributor

This is support of our docker-dev work in vladikoff/fxa-docker-dev#7. And it's currently WIP.


The idea here is that the auth-server should be able to stand up even if the db-server is currently on fire. We don't actually need to start listening for requests. If an incoming request needs access to the database, we will already correctly send back a 500 if the db connection fails.

@rfk
Copy link
Contributor

rfk commented Mar 12, 2017

/cc @vladikoff @jrgm who mentioned this problem recently

// TODO: transition to api version
// patchLevel is mysql specific
if (
api.patchLevel < options.patchLevel ||
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, the returned api JSON didn't included a patchLevel, and our options don't have a patchLevel, so this becomes undefined < undefined, which is always false. So this never would throw an error, and currently could only give us a false sense of security. Killed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah good find, I think this works properly in db-mysql itself though 👍

@seanmonstar
Copy link
Contributor Author

I actually think this just an improvement all around. r? @vladikoff or @jrgm

@vladikoff
Copy link
Contributor

Restarting Circle build...

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

Successfully merging this pull request may close these issues.

None yet

3 participants