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

auth.Save() should be CAS safe #3414

Closed
tleyden opened this issue Apr 4, 2018 · 1 comment

Comments

@tleyden
Copy link
Contributor

commented Apr 4, 2018

From the looks of it, auth.Save() is not doing a CAS safe write, and it should be.

The implication is that under certain scenarios changes to a user could be accidentally discarded. For example, if multiple SG's were trying to update the same user concurrently.

Noticed during development for #3389

The development for #3389 is adding the ability to inject test behavior into certain operations to simulate CAS failures, which would probably useful for reproducing this issue in a unit test.

@adamcfraser

This comment has been minimized.

Copy link
Contributor

commented Apr 5, 2018

Since we don't maintain a revision history on principals, and auth.Save doesn't have any merge behaviour, we'd need to review which auth.Save() usages are making additive changes to principals (and so would have the potential to lose data during concurrent updates). It's possible that we don't need a CAS-safe write in every scenario, and performing a CAS-safe write should be optional in some cases.

@adamcfraser adamcfraser added this to the 2.2.0 milestone Apr 9, 2018

@adamcfraser adamcfraser added the icebox label Apr 9, 2018

@adamcfraser adamcfraser modified the milestones: 2.2.0, 2.1.0 Apr 9, 2018

@djpongh djpongh modified the milestones: 2.1.0, 2.2.0 May 30, 2018

@djpongh djpongh removed the P2: medium label Jun 7, 2018

@adamcfraser adamcfraser added P1: high backlog and removed icebox labels Jun 26, 2018

@adamcfraser adamcfraser self-assigned this Oct 1, 2018

@adamcfraser adamcfraser added ready and removed backlog labels Oct 1, 2018

@adamcfraser adamcfraser added in progress review and removed ready labels Nov 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.