Old dsrUpdate tasks return 500 after upgrading from v1.51 to v1.54
Describe the bug
After upgrading from v1.51.0 to v1.54.0 with --upgrade-db, old dsrUpdate tasks return HTTP 500. GET /tasks also fails whenever a page includes one, so I can't scroll through task history. New dsrUpdate tasks work. The upgradeDatabase task succeeded (upgradeFrom: v1.51.0, upgradeTo: v1.54.0).
To Reproduce
Create a dynamic search rule on v1.51.0, then upgrade the same Docker volume using:
MEILISEARCH_VERSION=v1.54.0 docker compose -f docker-compose.dev.yml pull meilisearch MEILISEARCH_VERSION=v1.54.0 docker compose -f docker-compose.dev.yml up -d --no-deps meilisearch docker compose -f docker-compose.dev.yml logs -f meilisearchRequest one of the old
dsrUpdatetasks. On my instance,GET /tasks/76returns HTTP 500:{"message":"error while decoding: invalid type: map, expected a sequence at line 1 column 364","code":"internal","type":"internal","link":"https://docs.meilisearch.com/errors#internal"}Try
GET /taskswith a page that includes that task, or scroll through the task list. That also returns 500. I also triedDELETE /tasks?uids=*andDELETE /tasks?types=dsrUpdate; both deletion tasks failed with the same decoding error and deleted nothing (matchedTasks: 73and13, respectively).
Expected behavior
Old tasks should remain readable after a successful upgrade, or at least be deletable. Is there a supported way to recover or remove them?
Screenshots
N/A — the API response is above.
Meilisearch version:
v1.51.0 → v1.54.0
Additional context
Relevant part of docker-compose.dev.yml (API key omitted):
services:
meilisearch:
image: 'getmeili/meilisearch:${MEILISEARCH_VERSION:-latest}'
command: ["meilisearch", "--upgrade-db"] # v1.51 and up
restart: unless-stopped
stop_grace_period: 1m
ports:
- '${FORWARD_MEILISEARCH_PORT:-7700}:7700'
environment:
MEILI_ENV: development
volumes:
- 'meilisearch-data:/meili_data'
volumes:
meilisearch-data:The pre-upgrade dump reports dbVersion: 1.51.0. Task 76's entry in tasks/queue.jsonl contains the old array-shaped actions:
"actions":[{"selector":{"indexUid":"movies","id":"120"},"action":{"type":"pin","position":0}}]The startup log says Skipping unnecessary migration: Migrate search rules to new schema. Happy to provide the dump privately if useful.
Source: meilisearch/meilisearch