Skip to content

Commit b2cb225

Browse files
committed
style: shorten the comment on the relaxed assertion
Six lines of rationale was the only multi-line comment in the file outside the license header; the surrounding style is single-line. The trade-off it described is in the PR description.
1 parent 40a20c8 commit b2cb225

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

tests/table/test_snapshots.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -645,12 +645,7 @@ def summary_calls(n_files: int) -> int:
645645
spy.reset_mock()
646646
_MergeAppendFiles(operation=Operation.APPEND, transaction=txn, io=table_v2.io)
647647
merge_init = spy.call_count
648-
# Upper bound, not equality: `Transaction.table_metadata` caches on the identity of
649-
# its inputs, so the second construction reads the same staged state and adds 0 calls.
650-
# The trade-off is that this assertion no longer catches an un-hoisting of
651-
# `_MergeAppendFiles.__init__` on its own — repeated reads of an unchanged state are
652-
# free either way. What it still pins is that constructing the producer cannot start
653-
# replaying updates per access again.
648+
# Upper bound, not equality: the cache absorbs this access when the staged state is unchanged.
654649
assert merge_init - fast_init <= 1, (
655650
f"_MergeAppendFiles.__init__ made {merge_init - fast_init} extra update_table_metadata "
656651
"calls over its superclass; expected at most 1"

0 commit comments

Comments
 (0)