Skip to content

Commit

Permalink
doc/comment changes
Browse files Browse the repository at this point in the history
  • Loading branch information
songgao committed May 30, 2017
1 parent fb11b2c commit 91f7309
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,14 +276,14 @@ Default: false
```


RejectreadOnly causes the driver to reject read-only connections. This is for a
possible race condition during an automatic failover, where the mysql client
gets connected to a read-only replica after the failover.
`rejectreadOnly=true` causes the driver to reject read-only connections. This
is for a possible race condition during an automatic failover, where the mysql
client gets connected to a read-only replica after the failover.

Note that this should be a fairly rare case, as an automatic failover normally
happens when the primary is down, and the race condition shouldn't happen
unless it comes back up online as soon as the failover is kicked off. On the
other hand, when this happens, an mysql application can get stuck on a
other hand, when this happens, a MySQL application can get stuck on a
read-only connection until restarted. It is however fairly easy to reproduce,
for example, using a manual failover on AWS Aurora's MySQL-compatible cluster.

Expand Down
2 changes: 1 addition & 1 deletion dsn.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ type Config struct {
InterpolateParams bool // Interpolate placeholders into query string
MultiStatements bool // Allow multiple statements in one query
ParseTime bool // Parse time values to time.Time
RejectReadOnly bool // Reject read-only connections; see README.md
RejectReadOnly bool // Reject read-only connections
Strict bool // Return warnings as errors
}

Expand Down

0 comments on commit 91f7309

Please sign in to comment.