From ea5b31a07b258a70215fcaadc221a9e340d0e302 Mon Sep 17 00:00:00 2001 From: Mahdi Dibaiee Date: Mon, 23 Dec 2024 11:41:18 +0000 Subject: [PATCH] source-oracle-flashback: debug logs in backfill --- source-oracle-flashback/source_oracle_flashback/api.py | 3 +++ source-oracle-flashback/source_oracle_flashback/resources.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/source-oracle-flashback/source_oracle_flashback/api.py b/source-oracle-flashback/source_oracle_flashback/api.py index c1aae1efd7..f04e8f81ea 100644 --- a/source-oracle-flashback/source_oracle_flashback/api.py +++ b/source-oracle-flashback/source_oracle_flashback/api.py @@ -212,12 +212,15 @@ async def fetch_page( i += 1 if i % CHECKPOINT_EVERY == 0: + log.debug("emitting checkpoint at CHECKPOINT_EVERY", i, "last_rowid", last_rowid) yield last_rowid if c.rowcount < backfill_chunk_size: + log.debug("had less than backfill_chunk_size documents", c.rowcount, "last_rowid", last_rowid) break if last_rowid is not None and (i % CHECKPOINT_EVERY) != 0: + log.debug("emitting final checkpoint of backfill", last_rowid, "total documents", i) yield last_rowid op_mapping = { diff --git a/source-oracle-flashback/source_oracle_flashback/resources.py b/source-oracle-flashback/source_oracle_flashback/resources.py index 9d8283664f..e63379a02f 100644 --- a/source-oracle-flashback/source_oracle_flashback/resources.py +++ b/source-oracle-flashback/source_oracle_flashback/resources.py @@ -154,7 +154,7 @@ async def tables_to_resources( break for (i, t) in enumerate(tables): - # if max_rowid is None, that maens there are no rows in the table, so we + # if max_rowid is None, that means there are no rows in the table, so we # skip backfill backfill = ResourceState.Backfill(cutoff=(max_rowids[i],)) if max_rowids[i] is not None else None