Skip to content

Fix notification cleanup failures on post actions#132

Merged
k3vin7 merged 3 commits into
mainfrom
codex/fix-notification-cleanup-500
Apr 3, 2026
Merged

Fix notification cleanup failures on post actions#132
k3vin7 merged 3 commits into
mainfrom
codex/fix-notification-cleanup-500

Conversation

@k3vin7

@k3vin7 k3vin7 commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • replace the MySQL-incompatible notification cleanup delete with a two-step keep-and-trim flow
  • process notification events after commit in a new transaction so post likes/comments do not fail with 500
  • add tests for the 100-notification boundary and listener failure isolation

Testing

  • ./gradlew test --tests com.daramg.server.notification.application.NotificationServiceIntegrationTest --tests com.daramg.server.notification.event.NotificationEventListenerTest --tests com.daramg.server.notification.application.NotificationServiceUnitTest

@k3vin7 k3vin7 merged commit 74acba3 into main Apr 3, 2026
1 check passed
@k3vin7 k3vin7 deleted the codex/fix-notification-cleanup-500 branch April 3, 2026 16:12

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the AI comment scheduling and notification systems to use event-driven architecture with Spring's TransactionalEventListener. It introduces an AiReplyScheduleEvent and a new NotificationService method to handle notification creation and trimming asynchronously after transaction commits. Additionally, it implements a mechanism to limit the number of notifications per user to 100, ensuring that older notifications are pruned. I have no further feedback to provide on the implementation details.

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.

1 participant