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

Đang mở
#1,517 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

  • #14000 của @tiensonqin — đã đóng, không merge

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Lĩnh vực
database

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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!)
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
29
Fork
2
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của logseq/db-test

Tất cả issue của logseq/db-test

Issue tương tự

Thêm issue về Databases

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.