Repository navigation
fix(#6468): JSONL importer must fail loudly when records are skipped - #6498
Merged
Merged
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Contributor
|
Tick the box to add this pull request to the merge queue (same as
|
…tralize per-record error handling save() could still succeed before the RID-map bookkeeping failed (e.g. a malformed "r" field), leaving an orphaned record with -onRowError skip: persisted, uncounted, and unreachable by ridIndex - the same cascade the fix targets, just one step later. Parse and validate the old RID before save() so that path can no longer happen, and give skip mode true per-record atomicity (commit/rollback per row instead of riding along in the batched commit) so a failed row can never be durably persisted by a later periodic commit. Also fold the five duplicated catch blocks (document/vertex/two edge branches) into load()'s dispatch loop so logging, error counting and the abort/skip decision live in one place, which incidentally brings schema-load failures under the same "no partial commit on abort" guarantee the rest of the fix provides. Regression tests cover the ghost-record scenario directly and the edge cascade-drop scenario described in ArcadeData#6468 (a failed vertex's referencing edge is now a counted, rolled-back error instead of a silent drop).
lvca
added a commit
to ArcadeData/arcadedb-docs
that referenced
this pull request
Aug 21, 2026
Was never documented even though the CSV and JSON importers already respected it; now the JSONL importer does too (ArcadeData/arcadedb#6498), making the gap more consequential since it governs whether an import fails loudly or silently drops bad records by default.
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The JSONL importer catches every per-record exception, logs it at SEVERE, and continues.
load()commits and returns normally regardless — so a partial import reports success. A single failed vertex leaves its RID out of the RID map, which then cascade-drops every edge touching it.Fix
loadDocument/loadVertex/loadEdge: each catch block now incrementscontext.errorsand, in the default-onRowError abortmode, rethrowsImportExceptionto fail the whole import. Abort-on-error is the existing default (onRowError=abort); the-onRowError skipflag acts as the--skip-errorsoverride.loadEdgeearly-return paths: the twoout/in vertex not foundbranches now also incrementcontext.errorsand, in abort mode, throwImportException.load(): catchesImportException, rolls back the in-flight transaction batch (only when this format owns the transaction — matchesJSONImporterFormat'scallerTransactionActiveOnEntrycontract), and marks the import as failed.finally: now only commits when a transaction is still active (prevents commit-after-rollback masking the original exception).The existing
context.errorscounter (already surfaced inImporterContext.toMap()) tracks the error count for both modes.Closes #6468