Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/changes/2.2.0/764.upgrade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Two of the upgrade's migrations reach the 2.1 instances that still serve
during a rolling restart; upgrade in a quiet window. The migration that
adds `component.unlisted_at` locks `component` (`ACCESS EXCLUSIVE`) and,
before it commits, writes the column on every unlisted version: until then
every query on `component` waits, from every instance, the 2.1 ones
included. It is brief on most installs and takes longest where many
versions are unlisted, as on a NuGet repository, where a client's delete
unlists (`SELECT count(*) FROM component WHERE NOT listed` counts the rows
it writes). The rename of `nexus_import` to `repository_import` takes the
table away from the 2.1 instances: until the last one is replaced, its
import worker logs `relation "nexus_import" does not exist` every few
seconds and its import API fails with the same error, and an import running
on it stops there. Let running imports finish, or cancel them, before the
upgrade, and start none until every instance runs 2.2.0. An import caught
by the upgrade stays `running` and is continued by a 2.2.0 instance once
its lease has run out (two minutes), as a resumed one is.
4 changes: 4 additions & 0 deletions docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -1998,6 +1998,10 @@ Then sign in as a local administrator and fix or disable the broken realm.
release first.
- Read the [changelog](../CHANGELOG.md) for each version you skip over. A
release that needs something other than a rolling restart says so there.
- In a rolling restart, the first instance of the new version migrates the
database while the instances of the old version still serve. When a
migration makes them wait or fail until they are replaced, the release's
upgrade notes say so, and what to do about it.
- Migrations run automatically on the first start of a new version and only
move forward. Rolling back to an older binary after a newer one has migrated
the database requires restoring the backup taken before the upgrade.
Expand Down
Loading