Upgrade over 26.9.0 not possible due to REINDEX

Aperta
#4,637 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
28/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
docker-compose, postgresql, shell
Ambito
databases, devops

Direzione di ricerca

Start by reading the linked issues 4516 and 4520 and checking how the upgrade script handles the REINDEX step. The report identifies duplicates in sentry_stringindexer and sentry_perfstringindexer during an upgrade from 26.7.0 to 26.11.0. Done means establishing a safe resolution for these duplicate rows and confirming the upgrade succeeds; the issue provides no test or code entry point.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Waiting for: Community
Self-Hosted Version

26.7.0

CPU Architecture

x86_64

Docker Version

29.10.0

Docker Compose Version

5.8.0

Machine Specification
  • My system meets the minimum system requirements of Sentry
Installation Type

Upgrade from 26.7.0 to 26.11.0

Steps to Reproduce
  1. git checkout 26.11.0
  2. .\install.sh
Expected Result

Successful upgrade

Actual Result

I updated both files for sentry.conf.py and config.yml as well as .env.
Upgrading from 26.7 to 26.11 fails:

  1. Run .\install.sh
  2. Cancels at the REINDEX step with the following error:
    sentry ERROR: could not create unique index "unique_org_string"
    DETAIL: Key (string, organization_id)=(ZGQ4eP63k56V1T-ZsOkYe, 1) is duplicated.

I know I should use the AI or the Issues to find a solution, but I don't get the exact solution for this.
What I did:

  1. Connect to the DB using docker compose exec postgres psql -U postgres -d postgres
  2. Run the script:
    SELECT string, organization_id, COUNT() as dup_count
    FROM sentry_stringindexer
    GROUP BY string, organization_id
    HAVING COUNT(
    ) > 1;
    -> returns 124 records with 2 entries each, but with different IDs! (also the one shown above)

Also the script for sentry_perfstringindexer (from issue 4516) returns 1 result.

Shall I delete the records from both tables anyway following issue 4520 (although having different IDs) and 4516?
Can I do this while Sentry is running or shall the other containers be stopped?

Event ID

No response

Lingua principale
Shell
Stelle
9.7k
Fork
2k
Merge medio
3g 2h
PR unite (30g)
16

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di getsentry/self-hosted

Tutte le issue di getsentry/self-hosted

Issue simili

Altre issue su Shell/Bash

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.