Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

[WIP] cmd/atomic-migrations-test: Atomic migrations test command #1809

Closed
wants to merge 2 commits into from

Conversation

tsenart
Copy link
Contributor

@tsenart tsenart commented Jan 11, 2019

This change set introduces:

  1. An isolated atomic migrations test command that reliably reproduces duplicate key value violates unique constraint "pg_type_typname_nsp_index" golang-migrate/migrate#55 and https://github.com/sourcegraph/sourcegraph/issues/1491.
  2. A patch to db/dbconn.go that safely ignores the error we're seeing and thus fixes There may be a problem with how we do DB migrations concurrently? #1491. See the code comment for more details.

Since I shared this PR in golang-migrate/migrate#55 with the test case, I'd like to keep the atomic-migrations-test code around. If there's a better place for it, please advice.

This commit introduces an isolated atomic migrations test command to
reliably reproduce these issues:

- golang-migrate/migrate#55
- https://github.com/sourcegraph/sourcegraph/issues/1491
@tsenart tsenart requested a review from beyang as a code owner January 11, 2019 19:50
@tsenart tsenart changed the title cmd/atomic-migrations-test: Atomic migrations test command [WIP] cmd/atomic-migrations-test: Atomic migrations test command Jan 11, 2019
@tsenart tsenart closed this Jan 11, 2019
@tsenart tsenart deleted the tsenart/atomic-migrations branch January 11, 2019 20:41
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.

There may be a problem with how we do DB migrations concurrently?
1 participant