Split last_upsert (persisted write) and last_refresh (run liveness) in stats

This commit is contained in:
Jan Doubravský
2026-06-09 08:48:29 +02:00
parent 6dc85e4f3c
commit 8744f458cc
10 changed files with 108 additions and 11 deletions
+9
View File
@@ -96,6 +96,15 @@ def test_stats_no_error_by_default(source_engine, patched_cache):
engine.close()
def test_stats_exposes_last_upsert_and_last_refresh(source_engine, patched_cache):
engine = CachingEngine(source_engine)
engine.execute("SELECT id, name FROM products")
s = engine.stats.tables["products"]
assert s.last_upsert is not None # the load wrote rows (persisted)
assert s.last_refresh is not None # the load also counts as a refresh-cycle run
engine.close()
# --- a table being loaded for the first time shows up as "loading" ----------