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

Add a check-and-set to deleteKV without changing return type #202

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Anusien
Copy link

@Anusien Anusien commented Jan 7, 2020

The main dilemma with adding check-and-set to deleteKV is that all the
delete KV methods return Response. Consequently we can't actually
return whether the c-a-s worked. We can't change Response to
Response without breaking a lot of existing code.

This just adds the capability for check-and-set but punts on the
Response problem. If callers want to see if the delete succeeded,
they'll have to do another getKV. However, this is the least invasive
version of this change.

#49

The main dilemma with adding check-and-set to deleteKV is that all the
delete KV methods return Response<Void>. Consequently we can't actually
return whether the c-a-s worked. We can't change Response<Void> to
Response<Boolean> without breaking a lot of existing code.

This just adds the capability for check-and-set but punts on the
Response<Void> problem. If callers want to see if the delete succeeded,
they'll have to do another getKV. However, this is the least invasive
version of this change.

Ecwid#49
@Anusien Anusien changed the title First draft of adding a check-and-set to deleteKV Add a check-and-set to deleteKV without changing return type Jan 7, 2020
@Anusien
Copy link
Author

Anusien commented Jan 7, 2020

This intentionally doesn't attempt to mess with the return type in the hopes of making incremental progress. Of the four possible solutions I outlined, this is number 1.

@Anusien
Copy link
Author

Anusien commented Jan 8, 2020

The CI failure:

Could not GET 'https://repo.maven.apache.org/maven2/org/junit/jupiter/junit-jupiter-engine/5.1.0/junit-jupiter-engine-5.1.0.pom'. Received status code 403 from server: Forbidden

@Anusien
Copy link
Author

Anusien commented Jan 9, 2020

@vgv any thoughts on approach?

@Anusien Anusien requested a review from vgv January 23, 2020 22:44
@Anusien
Copy link
Author

Anusien commented Mar 2, 2020

@vgv Did you have a chance to look at this?

@vgv
Copy link
Member

vgv commented Mar 3, 2020

Hi, sorry for long response. I will look into PR this weekend.

@Anusien
Copy link
Author

Anusien commented Jul 1, 2021

Just curious if you had a chance to look at this or any opinions on the approach.

@ParthKolekar
Copy link

Hello! I am following up on this. Are there any concerns about this @vgv?

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.

3 participants