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

Fix: Ignore duplicated messages of already forgotten messages #692

Merged
merged 3 commits into from
Feb 5, 2025

Conversation

amalcaraz
Copy link
Collaborator

Explain what problem this PR is resolving

Self proofreading checklist

  • Is my code clear enough and well documented
  • Are my files well typed
  • New translations have been added or updated if new strings have been introduced in the frontend
  • Database migrations file are included
  • Are there enough tests
  • Documentation has been included (for new feature)

Changes

  • There is a race condition scenario in which regular message confirmations are processed after a FORGET message referencing them has been processed, resulting in inconsistent final states (wrong aggregates, posts amends, and vm executions). As a fix we are checking if the message has already been forgotten to skip the process method in that cases.

  • dev and test environment docker configurations have been also added

Notes

We still need to migrate (delete duplicates) from aggregate_elements, aggregates, file_tags and posts tables.
The issue that was causing this inconsistent state has been fixed and we have considered that it doesn't worth it to clean
this tables for now as there are less than 1k orphan rows

@amalcaraz amalcaraz self-assigned this Jan 29, 2025
@amalcaraz amalcaraz requested a review from nesitor January 29, 2025 18:49
nesitor
nesitor previously approved these changes Feb 3, 2025
src/aleph/handlers/message_handler.py Show resolved Hide resolved
src/aleph/handlers/message_handler.py Outdated Show resolved Hide resolved
@amalcaraz amalcaraz force-pushed the angel-fix-forgotten_messages_filter branch from 6c54063 to 361bcbd Compare February 4, 2025 13:03
@amalcaraz amalcaraz force-pushed the angel-fix-forgotten_messages_filter branch from 361bcbd to ff7cc94 Compare February 4, 2025 13:23
@amalcaraz amalcaraz marked this pull request as ready for review February 4, 2025 13:25
@amalcaraz amalcaraz merged commit 3d257c2 into main Feb 5, 2025
4 checks passed
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