Skip to content

Commit f1bf062

Browse files
v1.15: Cancel dumpless update (#3257)
* add task `type`s * add rollback instructions * first draft ready
1 parent 93977c9 commit f1bf062

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

learn/update_and_migration/updating.mdx

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ Once the project has been successfully updated, you will receive an email confir
4747

4848
## Updating a self-hosted Meilisearch instance
4949

50-
<Warning>
5150
You may update a self-hosted instance in one of two ways: with or without a dump.
5251

52+
<Warning>
5353
This guide only works for v0.15 and above. If you are using an older Meilisearch release, please [contact support](https://discord.meilisearch.com) for more information.
5454
</Warning>
5555

@@ -156,9 +156,21 @@ Meilisearch should launch normally and immediately create a new `UpgradeDatabase
156156

157157
While the task is processing, you may continue making search queries. You may also enqueue new tasks. Meilisearch will only process new tasks once `UpgradeDatabase` is completed.
158158

159-
<Warning>
160-
If after the upgrade is completed the task status is set to `failed` or Meilisearch returns internal error messages to your queries, [restart your instance from the snapshot](/learn/data_backup/snapshots#starting-from-a-snapshot) you generated during step 1. You may then retry the upgrade, or upgrade using a dump. You are also welcome to open an issue on the [Meilisearch repository](https://github.com/meilisearch/meilisearch).
161-
</Warning>
159+
#### Rolling back an update
160+
161+
If the upgrade is taking too long, or if after the upgrade is completed its task status is set to `failed`, you can cancel the upgrade task.
162+
163+
Cancelling the update task automatically rolls back your database to its state before the upgrade began.
164+
165+
After launching Meilisearch with `--experimental-dumpless-upgrade` flag:
166+
167+
1. Cancel the `databaseUpgrade` task
168+
2. If you cancelled the update before it failed, skip to the next step. If the update failed, relaunch Meilisearch using the binary of the version you were upgrading to
169+
3. Wait for Meilisearch to process your cancellation request
170+
4. Replace the new binary with the binary of the previous version
171+
5. Relaunch Meilisearch
172+
173+
If you are upgrading Meilisearch to \<= v1.14, you must instead [restart your instance from the snapshot](/learn/data_backup/snapshots#starting-from-a-snapshot) you generated during step 1. You may then retry the upgrade, or upgrade using a dump. You are also welcome to open an issue on the [Meilisearch repository](https://github.com/meilisearch/meilisearch).
162174

163175
### Using a dump
164176

reference/api/tasks.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ This value is always `null` for [global tasks](/learn/async/asynchronous_operati
7474
### `type`
7575

7676
**Type**: String<br />
77-
**Description**: Type of operation performed by the task. Possible values are `indexCreation`, `indexUpdate`, `indexDeletion`, `indexSwap`, `documentAdditionOrUpdate`, `documentDeletion`, `settingsUpdate`, `dumpCreation`, `taskCancelation`, `taskDeletion`, and `snapshotCreation`
77+
**Description**: Type of operation performed by the task. Possible values are `indexCreation`, `indexUpdate`, `indexDeletion`, `indexSwap`, `documentAdditionOrUpdate`, `documentDeletion`, `settingsUpdate`, `dumpCreation`, `taskCancelation`, `taskDeletion`, `databaseUpgrade`, `documentEdition`, and `snapshotCreation`
7878

7979
### `canceledBy`
8080

0 commit comments

Comments
 (0)