CLI: SQLite import fails on graphs larger than 512MB (V8 string limit)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
Direzione di ricerca
Start by reading cli/lib/platform/node/cli_unix.ml, especially read_binary_file and its use of Node.Fs.readFileSync path latin1`. Trace how that data reaches the worker import API and identify a binary transport that avoids the V8 string limit. Reproduce with a SQLite file larger than 512 MiB and confirm import succeeds while small imports still work.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What happened
Importing a valid SQLite database larger than ~512 MiB into the Melange/OCaml CLI fails with an exception before reaching the graph worker:
{
"status": "error",
"error": {
"code": "exception",
"message": "Cli_unix.Cli_unix_error/1(4readCannot create a string longer than 0x1fffffe8 characters)"
}
}
Environment
- Logseq 2.0.2 beta (Melange CLI)
- Revision:
533ac4382a7b69baa98de3a973bff90305b212dc - Platform: macOS (installed native bundle)
Cause
In cli/lib/platform/node/cli_unix.ml, read_binary_file is implemented using Node.Fs.readFileSync path latin1. This wraps the binary data in a V8 string, which hits the 0x1fffffe8` character limit (~512MB) for the Latin-1 representation before the bytes can be passed to the worker import API.
Reproduction
Reproduced using a synthetic, valid sparse SQLite database:
- Size: 536,875,008 bytes (131,073 pages).
- Validated with
sqlite3 PRAGMA quick_check(returnsok) before import. - CLI command:
ELECTRON_RUN_AS_NODE=1 logseq .../logseq-cli.js graph import --type sqlite --path ...
A normal small SQLite import succeeds on the same build.
Suggested Fix
Pass the SQLite binary data to the worker without wrapping the full file in a V8 string, or use a more efficient transport for large binary files in the CLI.
- 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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di logseq/db-test
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Potential Dataloss: Deleting an entry from the property page's node table has no confirmation dialogForse già presa @tiensonqin l’ha presa 59 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Disabling Flashcards in Settings does not disable Flashcard shortcuts or tagsForse già presa @tiensonqin l’ha presa 60 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Tutte le issue di logseq/db-test
Issue simili
-
bug_feature_triaged Team: Mojo Libraries
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
letsrevel/revel-backend#1520 ·
I maintainer di solito rispondono entro 1 giorno
-
backend enhancement good first issue help wanted
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
nikhilb2/simple_invoicing#931 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
diivi/aseprite-mcp#43 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
NCAR/MMM-physics#33 ·