Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset Content Store payload_version to 0 in non-prod envs #2158

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

ChrisBAshton
Copy link
Contributor

@ChrisBAshton ChrisBAshton commented Jul 7, 2024

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.

Tested on Integration (via k exec deploy/content-store -it -- rails db -p and running the query in the console).

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.
Copy link
Member

@kevindew kevindew left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍 (with a caveat that I've not reviewed any SQL in Helm Charts PRs before)

@ChrisBAshton ChrisBAshton merged commit 0617a05 into main Jul 8, 2024
5 checks passed
@ChrisBAshton ChrisBAshton deleted the fix-env-sync-payload-version branch July 8, 2024 08:56
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.

3 participants