commit | 9c1705ed2be05a902c21449aab542df14b59b4bc | [log] [tgz] |
---|---|---|
author | Jonathan Amsterdam <jba@google.com> | Thu Jul 29 09:43:12 2021 -0400 |
committer | Jonathan Amsterdam <jba@google.com> | Thu Jul 29 18:00:15 2021 +0000 |
tree | f8ea02f7a1c3c142225c6b4256e1ba48b87516b8 | |
parent | 1ac144c39946cf04e6e3d40d09e3053e68447ed6 [diff] |
internal/postgres: update latest good version in a transaction Wrap postgres.DB.UpdateLatestGoodVersion in a transaction. This method is called when we delete a module. Since it wasn't running in a transaction, it could race with the similar call inside insertModule. This should fix the race condition. Change-Id: I91d0ae5c0060df16266e5e30230c981f5fbe994e Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/338173 Trust: Jonathan Amsterdam <jba@google.com> Run-TryBot: Jonathan Amsterdam <jba@google.com> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Julie Qiu <julie@golang.org>
Pkg.go.dev is a website for discovering and evaluating Go packages and modules.
You can check it out at https://pkg.go.dev.
If you want to report a bug or have a feature suggestion, please first check the known issues to see if your issue is already being discussed. If an issue does not already exist, feel free to file an issue.
For answers to frequently asked questions, see go.dev/about.
You can also chat with us on the #pkgsite Slack channel on the Gophers Slack.
We would love your help!
Our canonical Git repository is located at go.googlesource.com/pkgsite. There is a mirror of the repository at github.com/golang/pkgsite.
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.