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

Doesn't handle X-Riak-Deleted: true #1

Closed
awenger opened this issue Sep 28, 2013 · 1 comment
Closed

Doesn't handle X-Riak-Deleted: true #1

awenger opened this issue Sep 28, 2013 · 1 comment

Comments

@awenger
Copy link

awenger commented Sep 28, 2013

Hey,
The linked code will lead to a "SyntaxError: Unexpected end of input" crash: https://gist.github.com/awenger/6745092
I guess it isn't handling the "X-Riak-Deleted: true" Response properly.

I'm also wondering why the delete is creating a sibling?

@awenger
Copy link
Author

awenger commented Sep 29, 2013

Hi,
I looked at this again and I think it's not the proper way. Because now the deleted Sibling is just ignored and the get returns only the undeleted Sibling, although it should be deleted. This leads to the impression that there was no conflict and the document still exists. But Riak is telling us that the delete was in conflict (as I understand it).

I looked a bit deeper in the code and found out that the delete operation doesn't set the proper vclock.
Changing Line 137 (request = bucket: self.bucket, key: key, vclock: self.vclock) to (request = bucket: self.bucket, key: key, vclock: self.reply.vclock) solved this for me.

With this change the siblings don't show up.

As mentioned before I still think Siblings with "X-Riak-Deleted: true" should show up in the response but I don't have an Idea how to represent them because most probably they won't validate with Json Schema

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

1 participant