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

Erroneous log id when event store is empty #18

Open
mwillema opened this issue May 11, 2015 · 3 comments
Open

Erroneous log id when event store is empty #18

mwillema opened this issue May 11, 2015 · 3 comments

Comments

@mwillema
Copy link
Contributor

The method c.s.common.notification.NotificationLogFactory.calculateCurrentNotificationLogId computes an erroneous NotificationLogId when the event store is empty. For example NOTIFICATIONS_PER_LOGis set to 20. Then at line 61, 0 % 20 = 0. Then at line 64 remainderis set to 20. Finally, at line 67, lowis set to 0 - 20 + 1 = 19.

By changing the condition at line 63 into remainder == 0 && count > 0, the issue is fixed.

@VaughnVernon
Copy link
Owner

If you would like to make this change and create a pull request, I will merge it. Let me know if you can do this, or if you want me to.

@mwillema
Copy link
Contributor Author

I've done a pull request: #19

@VaughnVernon
Copy link
Owner

Thanks!

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

No branches or pull requests

2 participants