-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2158 from alphagov/fix-env-sync-payload-version
Reset Content Store `payload_version` to 0 in non-prod envs
- Loading branch information
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
-- sqlfluff:dialect:mysql | ||
|
||
-- Occasionally, Content Store and Publishing API can fall out of | ||
-- sync in non-production environments after the environment sync | ||
-- process has completed. Content Store can be a day 'ahead' of | ||
-- Publishing API. | ||
-- | ||
-- Consequently, any publish events from Publishing API in the | ||
-- affected environment will be rejected by Content Store, if the | ||
-- `Event.maximum_id` in Publishing API is behind the | ||
-- `payload_version` of the `ContentItem` being updated in Content | ||
-- Store. | ||
-- | ||
-- The pragmatic fix is to reset the `payload_version` in Content | ||
-- Store so that it can never be ahead of Publishing API. | ||
UPDATE content_items | ||
SET payload_version = 0; |
This file contains 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