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

Prevent saga id from being changed #1235

Closed
ramonsmits opened this issue Jun 13, 2013 · 1 comment · Fixed by #2495
Closed

Prevent saga id from being changed #1235

ramonsmits opened this issue Jun 13, 2013 · 1 comment · Fixed by #2495
Milestone

Comments

@ramonsmits
Copy link
Member

If a modification of the Saga Id then an exception will be thrown

A modification of IContainSagaData.Id has been detected. This property is for infrastructure purposes only and should not be modified. SagaType: TheSagaType

In a response to a question of mine in the mailinglist it seems that you should not change the saga id. Although I'm not exactly sure why this is inappropriate as often you already use guids for identification and this unnecessarly uses more storage and creates an additional index which is not required as the primary key is already having a clustered index.

Although it works I also found a scenario where it can cause issues. When two different saga types within the same service share the same ID and both are using timeouts then a timeout belong to just one of these saga types.

You could also say that a timeout which refers to a saga should not only be identified by its key but also by its type.

But, my guess is that changing the key should either be prevented (making the setter internal or ) or be checked for modification after the saga has been invoked.

@ramonsmits
Copy link
Member Author

Also, if IT IS allowed to change the saga id then maybe it should not be allowed that the id is Guid.Empty so SagaDispatcherFactory validates this.

SimonCropp added a commit that referenced this issue Oct 18, 2014
@SimonCropp SimonCropp added this to the 5.1.0 milestone Oct 19, 2014
@SimonCropp SimonCropp changed the title Prevent saga id to be changed Prevent saga id from being changed Oct 31, 2014
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 a pull request may close this issue.

2 participants