Permanently deleting a page containing an invalid advanced query from the recycle bin causes the graph to crash

Aperta
#1,517 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

  • #14000 di @tiensonqin — chiusa senza merge

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Ambito
database

Direzione di ricerca

Start by reproducing the crash with the incomplete advanced query ({} or { :query [] }) in a DB graph, then deleting that page from the Recycle bin. The payload names no files or tests, so locate the recycle-bin permanent-delete path and find where it loads or renders the page's blocks. Done means permanent deletion succeeds without the graph crashing, and a regression test covers deleting a page that holds an invalid advanced query.

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

Descrizione

Search first
  • I searched and no similar issues were found
What Happened?

I encountered this issue when trying to permanently delete a problematic page (loading the page causes the graph to crash) from the Recycle bin since I wanted to reuse the old name without logseq automatically repopulating the newly created page with the problematic contents.

The page in question contained an incomplete advanced query that causes the graph to crash whenever the page is opened (see my comment on the related issue )

Reproduce the Bug
  1. Create a DB graph (happens on an existing one too)
  2. create a new page and add an 'Advanced query" to a block inside it
  3. Inside the code block for the query type either of the following: {} or { :query [] } and click onto an empty block
  4. Observe the graph crashing with the "Something went wrong" page requiring a restart.
  5. Delete the page with the problematic query, sending it to the 'Recycle' as Logseq calls it.
  6. Delete the page from the Recycling bin.
  7. Observe the graph crashing with the "Something went wrong" page requiring a restart.
  8. Upon restart the page is deleted and the graph works perfectly.
Expected Behavior

A deleted page (that causes a graph to crash) is deleted and subsequently moved to the "Recycle" as Logseq calls it, should be deletable form the recycling bin without it being loaded in such a way as to cause a crash.

Screenshots
Image

Example of an advanced query code body that casues the crash the moment I click of of the query.

Desktop or Mobile Platform Information

EDIT: App version: 2.0.2
OS: Fedora Linux 44
Desktop Environment: KDE version 6.8.2

CPU: Intel® Core™ i7-10700K
GPU: AMD Radeon RX 6700 XT

Additional Context

No response

Are you willing to submit a PR? If you know how to fix the bug.
  • I'm willing to submit a PR (Thank you!)
Lingua principale
Nessun dato sulla lingua
Stelle
29
Fork
2
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 logseq/db-test

Tutte le issue di logseq/db-test

Issue simili

Altre issue su Databases

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.