ConnectionSyncReport
What one connection's slice of a sync() call did (SPEC §8).
pages_fetched is this connection's share of the one shared
budget, partitioned into the two phases it was spent on:
pages_fetched == live_pages + backfill_pages, always.
Raises auradefi.errors.ValidationError when any count
(pages_fetched, live_pages, backfill_pages,
transactions_ingested) is negative, when no_op is True and
ANY of those four is non-zero, a no-op that fetched pages or
ingested transactions is a lie, or when the two halves do not sum
to pages_fetched.
failed defaults to False, so every row written before the field
existed still means "this went fine". It is True when the
connection's sync raised an auradefi.errors.AuradefiError that
the tick contained (RELEASE_0.1.1 §5 #24), and it is MUTUALLY
EXCLUSIVE with no_op: "nothing needed doing" and "I could not do
it" are different answers, and a row claiming both raises
ValidationError rather than being believed. A failed row still
obeys every count invariant. Failure is not a licence to emit an
incoherent partition.
Fields
connection_idstrno_opboolpages_fetchedintlive_pagesintbackfill_pagesinttransactions_ingestedintlive_cursorintbackfill_cursorint | Nonebackfill_completeboolfailedbooldefault Falsefailure
failure(cls, connection_id: str, state: SyncState) -> ConnectionSyncReport
The row for a connection whose sync RAISED; pinned shape.
Every count is 0, work a tick could not observe is never claimed
as done, while the cursors are ECHOED from state, the last
thing the store persisted, so the row says WHERE the connection
stands as well as that it is stuck. no_op is False, which the
failed/no-op exclusion requires anyway: a caller must never read
a contained failure as a quiet tick (RELEASE_0.1.1 §5 #24).
Parameters
connection_idrequired, strnone
staterequired, SyncStatenone
__init__
__init__(self, connection_id: str, no_op: bool, pages_fetched: int, live_pages: int, backfill_pages: int, transactions_ingested: int, live_cursor: int, backfill_cursor: int | None, backfill_complete: bool, failed: bool = False) -> None
Parameters
connection_idrequired, strnone
no_oprequired, boolnone
pages_fetchedrequired, intnone
live_pagesrequired, intnone
backfill_pagesrequired, intnone
transactions_ingestedrequired, intnone
live_cursorrequired, intnone
backfill_cursorrequired, int | Nonenone
backfill_completerequired, boolnone
failedoptional, bool, default Falsenone