You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
on_error="ignore"|"raise" parameter declared but not wired into the write. FIXME: "does not perform any sensible error handling yet"
Stub only
MongoDB bulk (io/mongodb/api.py:182)
Catches all, logs, sets outcome=False, continues
None (out of scope, see below)
DynamoDB reader (io/dynamodb/adapter.py:29)
on_error="log"|"raise", default "log"
Present
Lambda handler (io/awslambda/kinesis.py)
ON_ERROR env var
Present
Two concrete problems:
MongoDB CDC has a dead on_error parameter. Accepts "ignore"|"raise" but ignores it. The FIXME is honest about this.
Naming inconsistency. DynamoDB and Lambda use "log". MongoDB CDC uses "ignore". Kinesis relay has no switch. Callers writing to multiple adapters see three different conventions.
Proposal
Wire up MongoDB CDC error handling. Catch ProgrammingError / OperationalError around the write, honour the on_error parameter, resolve the FIXME.
Add on_error to the Kinesis relay with the same signature.
Standardise on "log"|"raise" across both adapters. Rename MongoDB CDC's "ignore" value to "log" (breaking change, "ignore" already didn't do anything meaningful).
Background
Write-failure handling varies across I/O adapters. Surfaced in PR #718 review (Kinesis relay error propagation).
io/kinesis/relay.py:173)ProgrammingError/OperationalErrorio/mongodb/cdc.py:41,:90)on_error="ignore"|"raise"parameter declared but not wired into the write. FIXME: "does not perform any sensible error handling yet"io/mongodb/api.py:182)outcome=False, continuesio/dynamodb/adapter.py:29)on_error="log"|"raise", default"log"io/awslambda/kinesis.py)ON_ERRORenv varTwo concrete problems:
on_errorparameter. Accepts"ignore"|"raise"but ignores it. The FIXME is honest about this."log". MongoDB CDC uses"ignore". Kinesis relay has no switch. Callers writing to multiple adapters see three different conventions.Proposal
ProgrammingError/OperationalErroraround the write, honour theon_errorparameter, resolve the FIXME.on_errorto the Kinesis relay with the same signature."log"|"raise"across both adapters. Rename MongoDB CDC's"ignore"value to"log"(breaking change,"ignore"already didn't do anything meaningful)."raise"for Kinesis relay (preserves post-Relay: Propagate write failures, bump async-kinesis to 2.4.0 #718 behaviour, no silent data loss),"log"for MongoDB CDC (preserves current default intent, though it previously did nothing).Scope
cratedb_toolkit/io/kinesis/relay.py— addon_errorparametercratedb_toolkit/io/mongodb/cdc.py— wire parameter, rename"ignore"→"log""log"and"raise"modeson_errorin the Kinesis and MongoDB CDC sectionsOut of scope (follow-ups)
BulkProcessor), keep for a separate trancheON_ERRORenv var; aligning env-var naming can be a follow-up