@@ -147,11 +147,11 @@ hold driver-owned memory that callers release locally.
147147Driver-side semantics
148148---------------------
149149
150- - **Begin ** validates options, creates the target table for
151- `` create ``/`` replace ``/`` create_append `` modes, and returns a handle
152- that encodes whatever state the driver needs to scope subsequent
153- writes (UUID, target catalog/schema/table, transaction id, object
154- store prefix, etc.) .
150+ - **Begin ** validates options, performs whatever setup the driver
151+ requires for writes to proceed (e.g., creating the target table for
152+ `` create ``/`` replace ``/`` create_append `` modes, reserving a
153+ transaction snapshot, allocating an object-store prefix), and returns
154+ a handle that encodes the state needed to scope subsequent writes .
155155- **Write ** takes a handle and a stream, writes the partition into
156156 driver-private staging (a per-write staging table, a per-write
157157 object-store path), and returns a receipt encoding what was
@@ -221,20 +221,8 @@ For ``append`` mode, the schema parameter is optional; if supplied
221221it is validated against the target so a thousand workers don't all
222222fail independently with the same schema-mismatch error.
223223
224- 3. No caller-supplied partition IDs
225- -----------------------------------
226-
227- Earlier drafts gave each ``Write `` a caller-supplied ``partition_id ``
228- for idempotent retry. Dropped: receipts are the source of truth for
229- what gets committed, and well-designed drivers write each ``Write ``
230- to a unique location (per-call staging table, per-call data file).
231- A retried ``Write `` produces a *new * receipt; the original write
232- becomes orphaned and is collected by ``Abort ``. Caller-supplied IDs
233- only matter for drivers that share staging across writes — which they
234- shouldn't.
235-
236- 4. Driver-owned output structs (handle, receipt)
237- ------------------------------------------------
224+ 3. Driver-owned output structs (handle, receipt)
225+ -------------------------------------------------
238226
239227An earlier draft used the ``GetOptionBytes `` two-phase sizing
240228pattern: caller passes a buffer + capacity, driver reports required
@@ -249,7 +237,7 @@ The chosen pattern (driver-owned struct with a release callback)
249237mirrors ``AdbcPartitions `` on the read side, eliminates the orphan
250238window, and gives drivers a clean place to free internal state.
251239
252- 5 . ``Commit `` and ``Abort `` take raw bytes, not structs
240+ 4 . ``Commit `` and ``Abort `` take raw bytes, not structs
253241-------------------------------------------------------
254242
255243Symmetric with ``AdbcConnectionReadPartition ``, which takes the raw
@@ -259,7 +247,7 @@ arrive as raw bytes; forcing the caller to wrap them in
259247``AdbcIngestReceipt `` structs (with bogus ``release `` callbacks)
260248would be friction without benefit.
261249
262- 6 . Lost receipts are handled by handle-scoped sweep, not by receipts
250+ 5 . Lost receipts are handled by handle-scoped sweep, not by receipts
263251--------------------------------------------------------------------
264252
265253If a worker writes data but its receipt is lost in transit, the
@@ -276,7 +264,7 @@ optimization (fast-path deletion of known writes); the handle is the
276264authority for cleanup scope. Drivers that cannot enumerate from
277265the handle alone cannot correctly implement partitioned ingest.
278266
279- 7 . Coordinator may die without calling ``Commit `` or ``Abort ``
267+ 6 . Coordinator may die without calling ``Commit `` or ``Abort ``
280268--------------------------------------------------------------
281269
282270The handle is opaque to the driver outside of ``Write ``, so the
@@ -292,27 +280,6 @@ behaviors:
292280The spec does not mandate any of these; it documents the failure
293281mode and leaves the policy to drivers.
294282
295- Open questions
296- ==============
297-
298- These are intentionally unresolved in the initial revision.
299-
300- - **Single-coordinator commit only. ** Two coordinators calling
301- ``Commit `` on the same handle concurrently is undefined. Should
302- drivers be required to detect and reject this, or is it the
303- caller's responsibility?
304- - **Subset writes. ** Today the prototype assumes each worker writes
305- the same column set. Receipts encode the column list, so it is
306- possible to support per-worker subsets in the future, but this is
307- not specified yet.
308- - **Append-mode schema validation. ** The schema parameter is
309- optional in ``append `` mode. Should drivers be *required * to
310- validate when a schema is supplied? Currently "should".
311- - **Streaming Commit. ** Today ``Commit `` takes all receipts at
312- once. For very-many-partition jobs (10k+ workers) it may be
313- preferable to incrementally accumulate receipts. Out of scope for
314- v1.
315-
316283Reference implementation
317284========================
318285
0 commit comments