commit | a924a4ce832e44f9e31b0051415c703e454e9dfc | [log] [tgz] |
---|---|---|
author | Jonathan Amsterdam <jba@google.com> | Wed May 20 11:19:26 2020 -0400 |
committer | Jonathan Amsterdam <jba@google.com> | Thu May 21 16:06:11 2020 +0000 |
tree | 32ac4ccf29ed01c46a343d6944598d14bbcfed41 | |
parent | 216e30b8a72219ca9b326f6219e752abcb42c0f2 [diff] |
internal/database: support serializable transactions Add DB.TransactSerializable, which executes a transaction with serializable isolation. Although serializable transactions are more expensive, they reduce the risk for anomalies, like the constraint violations we sometimes see. This CL does not change any existing behavior. In particular, the DB.Transact method, despite calling sql.DB.BeginTx instead of sql.DB.Begin, uses the background context exactly as Begin does (source: https://github.com/golang/go/blob/go1.14.3/src/database/sql/sql.go#L1689). Change-Id: Iab9c99ca35de9ef884b149a3b39ecac3300ecac0 Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/750952 Reviewed-by: Julie Qiu <julieqiu@google.com>
Pkg.go.dev is a website for discovering and evaluting Go packages and modules.
Pkg.go.dev launched in November 2019, and is currently under active development by the Go team.
Our current goal is to work towards redirecting godoc.org traffic to pkg.go.dev, and ensure that we address users' needs in the process. Read more about our plans for pkg.go.dev in 2020.
We encourage everyone to begin using pkg.go.dev today for all of their needs and file feedback! You can redirect all of your requests from godoc.org to pkg.go.dev, by visiting godoc.org/?redirect=on. Details at Go issue #37099.
If you are having issues with pkg.go.dev, please first check the known issues before following the troubleshooting guide. If that does not give you the information you need, reach out to us.
You can chat with us on the #tools slack channel on the Gophers slack.
If you think you have an issue that needs fixing, or a feature suggestion, then please make sure you follow the steps to file an issue with the right information to allow us to address it.
We would love your help!
Our canonical Git repository is located cat go.googlesource.com/discovery. There is a mirror of the repository at github.com/golang/discovery.
To contribute, please read our contributing guide.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.