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

possibly fixes the issue with post number calculation #3358

Merged
merged 7 commits into from
Mar 31, 2022

Conversation

luceos
Copy link
Member

@luceos luceos commented Mar 23, 2022

This PR fixes the post number calculation causing exceptions Integrity constraint violation: 1062 Duplicate entry as reported by @iPurpl3x and clearly visible in highly volatile communities.

This fix is currently applied to a non-public Flarum instance running in sync with the production community by Bokt (@BartVB). The last error reported was a bit less than 40 minutes ago, with posts happening every second I expect this issue to recur at least a few times the coming 24 hours. If the issue occurs again this PR is invalid.

Will report back.

Copy link
Sponsor Member

@askvortsov1 askvortsov1 left a comment

Choose a reason for hiding this comment

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

The CI issues will also need to be fixed

@luceos
Copy link
Member Author

luceos commented Mar 23, 2022

The CI issues will also need to be fixed

Fixed the major one. There's still something funky with sorting or something of the post ids...

That doesn't matter since there's no default sort for posts in the backend.
@luceos
Copy link
Member Author

luceos commented Mar 29, 2022

Core tests seem okay now. I've not seen the Integrity constraint exception resurface on Bokt 🥳 @askvortsov1 imo this is ready for merging.

Copy link
Member

@SychO9 SychO9 left a comment

Choose a reason for hiding this comment

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

neat

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.

PDOException : Duplicate entry '.....' for key 'posts_discussion_id_number_unique'
5 participants