-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Description
This is a regression of #21609
Introduced in #27886
Specifically, here: https://github.com/trinodb/trino/pull/27886/changes#diff-79f367e47040dda32ac81ecec46b27cfd7cc822858bc8c31fe435a15a47446dcL1378-R1385
Pre-#27886, the behaviour was to always call writeCheckpointIfNeeded, which would write a checkpoint based on the checkpoint writing interval.
There was a bug in there: if the schema changed, we should write a checkpoint regardless of interval. The goal of #27886 was to fix this bug, but instead it changed the logic to write a checkpoint only if the schema changed.
As a result, we're now not writing checkpoints on tables that get updated solely with CREATE AND REPLACE, which was originally fixed in #21609
This was not caught in CI because the unit tests introduced in #21609 unfortunately also did a schema change (!), which meant they were still passing after #27886.