#15718

Import silently skips some documents (no error shown)

Opensergeymesilovopened 11d ago

Import silently skips some documents (no error shown)

Version: 0.27.4, self-hosted Docker, import in the web app.

What happened

Three separate imports silently dropped files while reporting success:

ImportSourcePages createdMissing
1folder with 45 .md44concepts/my-setup/pitfalls.md (25 KB, valid UTF-8 markdown)
2zip with 3 .md + 62 images (21.9 MB)1research-canvases-research-board.md, research-canvases-hermes-desktop-...-rubric-agentic-os.md
3zip with 115 .md + 25 images (24.3 MB)115 (after ~30 s)0 — but the counter showed 65 right after Import completed

The UI showed Import completed — Your document has been imported successfully in all three cases. Nothing was reported about skipped files; I only found them by comparing the imported titles with the source folder.

Re-importing the missing files in a separate, smaller archive worked:

  • pitfalls.md alone → imported;
  • the two canvas pages as two separate zips (3.1 MB and 14.1 MB) → both imported on the first try.

Expected: either every file is imported, or the dialog lists what was skipped and why.

Actual: silent partial import; the user has to diff titles against the source to notice.

Notes that may help

  • the import seems to be asynchronous: right after Import completed, select count(*) from workspace_pages showed 502, and 30 seconds later 552 — i.e. the count was still catching up. Issue 2 might be related to this: the UI may report completion before all documents are committed.
  • filters are not the cause: isSystemImportPath rejects only __MACOSX and .DS_Store (markdown.ts:459-461), and the missing file had no such path.
  • the missing file was not the largest one in the batch (two bigger files imported fine), was not the only one with inline tags: [..], and the same folder (concepts/my-setup) had 7 of 8 files imported.

Reproduction

  1. Take a folder with 45 .md files (mixed subfolders).
  2. Import via Import → Markdown files (.md).
  3. Compare the number of created pages with the number of files: 44 vs 45, no error in the dialog.

Activity

1
affine-issue-bot[bot]11d ago

Issue Status: 🆕 *Untriaged

*🆕 Untriaged

The team has not yet reviewed the issue. We usually do it within one business day. Docs: https://github.com/toeverything/AFFiNE/blob/canary/docs/issue-triaging.md

This is an automatic reply by the bot.