bug: restore view triggers and dependent views when a view changes - #494
Merged
Merged
Conversation
Boot skips any file whose digest is unchanged. Recreating a view drops the triggers on it (v_pool_maps lost its INSTEAD OF triggers, so every map-pool insert failed) and, with CASCADE, the views built on it (player_perf_career takes player_performance_v), while the files defining those still matched. A change to any view file now re-applies every view and trigger file, in the same order as a fresh install.
…sses Forcing every view and trigger file wrote the view digests before the trigger pass, so a boot that died in between never restored the v_pool_maps triggers, and it re-ran all 68 trigger files (table locks, the event_match_links backfill) on any view change. A view change now deletes the digests of every view file and of the trigger files that create INSTEAD OF triggers; each file writes its digest back only once it applied, so an interrupted boot is finished by the next one and table trigger files keep their normal digest check.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re-applying a changed view dropped the INSTEAD OF triggers on v_pool_maps (and views removed by CASCADE), and boot skipped the unchanged files that would recreate them, so map-pool edits broke.
From DEAFCS: DEAFCS/api-deafcs@9aec7932