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 bug caused by late nva state store nullification #96

Merged
merged 3 commits into from
Feb 16, 2024

Conversation

Kelerchian
Copy link
Contributor

No description provided.

@Kelerchian Kelerchian requested a review from rkuhn February 15, 2024 16:41
Copy link
Member

@rkuhn rkuhn left a comment

Choose a reason for hiding this comment

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

Yes, it makes sense to not purge the state when it wasn’t the state from which the command originated. But why do we need to purge upon persistence at all?

Overall it feels to me like all this machinery has grown out of control. Does it really need to be this complex?

@@ -859,6 +875,7 @@ namespace NextValueAwaiter {
consume,
peek,
purge,
Copy link
Member

Choose a reason for hiding this comment

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

this is no longer used, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's right. It is no longer used.

emitter.on('next', nva.push)
emitter.on('failure', nva.fail)
emitter.on('commandPersisted', nva.purge)
emitter.on('commandPersisted', purgeWhenMatching)
Copy link
Member

Choose a reason for hiding this comment

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

why do we do this at all?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This started when we observed, during one of Jose's presentation on SW's ActyxServiceBase refactor, that a command call should purge so that subsequent .next/.peekNext call will not be the same state that calls the command.

As for the specific timing of the purge (on persistence), this is the reasoning #92 (comment)

@Kelerchian Kelerchian merged commit 6b2dd4b into master Feb 16, 2024
1 check passed
@Kelerchian Kelerchian deleted the ada/bug-command-persistence-purge branch February 16, 2024 07:54
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