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

Delete a non-existent key #31

Open
pareshpp opened this issue Aug 21, 2015 · 1 comment
Open

Delete a non-existent key #31

pareshpp opened this issue Aug 21, 2015 · 1 comment

Comments

@pareshpp
Copy link

I wanted a clarification on behavior of delete operation on a non-existent key. When delete operates on a non-existent key, the simulator returns True if force=True and false otherwise.

Why is the difference in behavior because of force=True while deleting a non-existent key if force=True has to do with db version?

c = Client('localhost', 8123)
c.connect()
c.delete('kfsdfdsfdbskljfdskfs9000000', force=True)
True
c.delete('kfsdfdsfdbskljfdskfs9000000')
False

@chiaming2000
Copy link
Contributor

For forced delete:
The client API library returns true if operation is successfully returned
from server (status code from device/simulator == SUCCESS).
Device/simulator does not check if entry exists in store.

For versioned delete:
The client API library returns true if entry is found and deleted (status
code from device/simulator == SUCCESS). Otherwise, returns false (status
code from device/simulator == NOT_FOUND). The device/simulator DOES check
if entry exists in store.

Please see Javadoc also for more information:
http://seagate.github.io/kinetic-java/index.html?kinetic/client/KineticClient.html

Thanks.
chiaming

On Fri, Aug 21, 2015 at 6:35 AM, pareshpp [email protected] wrote:

I wanted a clarification on behavior of delete operation on a non-existent
key. When delete operates on a non-existent key, the simulator returns True
if force=True and false otherwise.

Why is the difference in behavior because of force=True while deleting a
non-existent key if force=True has to do with db version?

c = Client('localhost', 8123)
c.connect()
c.delete('kfsdfdsfdbskljfdskfs9000000', force=True)
True
c.delete('kfsdfdsfdbskljfdskfs9000000')
False


Reply to this email directly or view it on GitHub
#31.

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

No branches or pull requests

2 participants