mirror of
https://github.com/ModernRelay/omnigraph.git
synced 2026-06-09 01:35:18 +02:00
- storage.md: document the row-level CAS annotation on `__manifest.object_id` and the `expected_table_versions` OCC contract on `ManifestBatchPublisher::publish`. - errors.md: list `ManifestConflictDetails` and its variants alongside `ManifestError`. - constants.md: add `PUBLISHER_RETRY_BUDGET = 5`. Per AGENTS.md "Maintenance contract": new schema construct, new constant, and new typed error shape all need to ship with the source change.
1.5 KiB
1.5 KiB
Errors and Result Serialization
Error taxonomy (omnigraph::error::OmniError)
Compiler(...)— schema/query parse/typecheck errorsLance(String)— storage layerDataFusion(String)— execution layerIo(io::Error)Manifest(ManifestError { kind: BadRequest|NotFound|Conflict|Internal, details: Option<ManifestConflictDetails>, … })ManifestConflictDetails::ExpectedVersionMismatch { table_key, expected, actual }— caller'sexpected_table_versionsdid not match the manifest's current latest non-tombstoned version (set byOmniError::manifest_expected_version_mismatch).ManifestConflictDetails::RowLevelCasContention— Lance row-level CAS rejected the publish because a concurrent writer landed the sameobject_id. Retried internally by the publisher; only surfaces if the retry budget exhausts.
MergeConflicts(Vec<MergeConflict>)
Compiler-side NanoError covers parse / catalog / type / storage / plan / execution / arrow / lance / IO / manifest / unique-constraint, each with structured spans (SourceSpan { start, end }) for ariadne-style diagnostics.
Result serialization (omnigraph_compiler::result::QueryResult)
to_arrow_ipc()— efficient binaryto_sdk_json()— JS-safe JSON (large i64 wrapped in metadata)to_rust_json()— Rust-friendly JSONbatches()— direct ArrowRecordBatchaccess
Mutation results: { affectedNodes: usize, affectedEdges: usize } (also exposed as a tiny Arrow batch).