Skip to content

Fix: Dont backfill seeds if the seed data didnt actually change#5398

Merged
erindru merged 2 commits intomainfrom
erin/fix-seed-erroneous-backfill
Sep 18, 2025
Merged

Fix: Dont backfill seeds if the seed data didnt actually change#5398
erindru merged 2 commits intomainfrom
erin/fix-seed-erroneous-backfill

Conversation

@erindru
Copy link
Collaborator

@erindru erindru commented Sep 18, 2025

Prior to this, a simple metadata change on a seed would trigger it to be recreated / data reloaded:

Screenshot From 2025-09-18 13-23-31

This PR updates should_force_rebuild to return False on a seed snapshot if only its metadata changed. This works because snapshots with metadata changes share the physical table with the previous snapshot, meaning:

  • intervals are inherited from the previous snapshot
  • this causes missing_intervals() to return no missing intervals
  • causing no backfill!
Screenshot From 2025-09-18 14-20-58

# seeds with metadata updates should be categorized as forward_only to prevent unnecessary backfill
# backfill should only happen if the actual seed data changes, in which case it will be classed as
# directly modified / breaking and not forward only as this code path will not be hit
forward_only = True
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I've realized this might not be necessary. METADATA category already reuses the version

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, you're right. I've simplified this PR

@erindru erindru enabled auto-merge (squash) September 18, 2025 03:33
@erindru erindru merged commit 52961f0 into main Sep 18, 2025
36 checks passed
@erindru erindru deleted the erin/fix-seed-erroneous-backfill branch September 18, 2025 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants