-
Notifications
You must be signed in to change notification settings - Fork 26
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/ub 1671 idempotent issues in delete #266
Conversation
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.
NOTE: there is one comment to fix, please check it. And if it passed staging then feel free to merge to dev.
Reviewed 8 of 8 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @olgashtivelman)
local/scbe/datamodel_wrapper.go, line 103 at r1 (raw file):
// sanity if d.dbVolume == nil { return d.logger.ErrorRet(&resources.VolumeNotFoundError{VolName: name}, "failed")
I think its better to add here a logging for idempotent, like we do in many other cases of idempotent.
Of course not to raise error just message to the log that this is the case.
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.
Reviewable status: 7 of 8 files reviewed, 1 unresolved discussion (waiting on @shay-berman)
local/scbe/datamodel_wrapper.go, line 103 at r1 (raw file):
Previously, shay-berman wrote…
I think its better to add here a logging for idempotent, like we do in many other cases of idempotent.
Of course not to raise error just message to the log that this is the case.
Done.
in this PR the idempotent issues in the delete request are fixed. the issues are as follows: (in delete volume function) * in get Back-end in the storage_api_handler delete function - if volume does not exist then return nil. * in get volume: if volume does not exist then return success * in vol delete from XIV : if an 404 error is returned from SC then continue with the flow. (to delete from ubiquity DB) * in delete volume from DB (for the case where we have a non-db volume) if a volume not found error is returned then return success. in all the above issues an idempotent there is a warning message in the logger. comment : an assumption is made that if a volume is removed from the DB then it is definitely removed from the storage since the removal from the DB is the latter operation. Note: addition PR to handle delete idempotent in the flex side -> #266
in this PR the idempotent issues in the delete request are fixed.
the issues are as follows: (in delete volume function)
in all the above issues an idempotent there is a warning message in the logger.
comment : an assumption is made that if a volume is removed from the DB then it is definitely removed from the storage since the removal from the DB is the latter operation.
Note: addition PR to handle delete idempotent in the flex side -> #266
This change is![Reviewable](https://camo.githubusercontent.com/23b05f5fb48215c989e92cc44cf6512512d083132bd3daf689867c8d9d386888/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)