-
Notifications
You must be signed in to change notification settings - Fork 154
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
Get avoid snapshot interval calculate int overflow #1088
Conversation
Signed-off-by: Andy.Chen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm. I think this is a bug fix and should ideally be backported to 1.0.x branch too.
@Roiocam Probably hard to test but could you consider if it's possible? |
@Roiocam just saw this in production @pjfanning |
@Roiocam Would you like to cherry pick this to 1.0.x ? Thanks. |
Yes, the reproduction can be implemented on |
Signed-off-by: Andy.Chen <[email protected]>
There is no need to write a plugin for just test this... |
I mean verified in such as pekko-persistence-jdbc |
Signed-off-by: Andy.Chen <[email protected]>
Motivation
When the user uses
Integer.MAX_VALUE
as keepNSnapshots, it will touch integer overflow, and persistence will never delete those events.This change will not change anything besides avoid overflow, because the persistence actor version already designed as a long type.
This screenshot was happened in the real world: