Fix frozen delta watermark and add error stats, lazy source, concurrent disk reads, and per-engine config

This commit is contained in:
Jan Doubravský
2026-06-08 19:35:33 +02:00
parent 209ae667ab
commit 6dc85e4f3c
17 changed files with 668 additions and 71 deletions
+23
View File
@@ -73,6 +73,29 @@ def test_counters_still_reported(source_engine, patched_cache):
engine.close()
def test_stats_exposes_table_error(source_engine, patched_cache):
engine = CachingEngine(source_engine)
engine.execute("SELECT id, name FROM products")
engine._cache.record_error("products", "ValueError: boom")
s = engine.stats
assert s.errors == 1
assert s.tables["products"].consecutive_failures == 1
assert s.tables["products"].last_error == "ValueError: boom"
assert s.tables["products"].last_error_at is not None
engine.close()
def test_stats_no_error_by_default(source_engine, patched_cache):
engine = CachingEngine(source_engine)
engine.execute("SELECT id, name FROM products")
s = engine.stats
assert s.errors == 0
assert s.tables["products"].consecutive_failures == 0
assert s.tables["products"].last_error is None
engine.close()
# --- a table being loaded for the first time shows up as "loading" ----------