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

Unable to save document edited during ChangeTracking #174

Open
MikeGoldsmith opened this issue Dec 16, 2016 · 7 comments
Open

Unable to save document edited during ChangeTracking #174

MikeGoldsmith opened this issue Dec 16, 2016 · 7 comments

Comments

@MikeGoldsmith
Copy link
Contributor

MikeGoldsmith commented Dec 16, 2016

This integration test fails:
BucketContextTests.SubmitChanges_WhenDocsAreModified_DocumentIsMutated
with the error:
Couchbase.Linq.CouchbaseConsistencyException : Data exists for key

The test enables ChangeTracking, retrieves and updates a document then calls SubmitChanges(). This should update the stored document, but is instead throwing CouchbaseConsistencyException which indicates the result's status was "KeyExists". See here.

I don't think a KeyExists response code should be interpreted as consistency issue.

@brantburnett
Copy link
Collaborator

@MikeGoldsmith

I believe that for inserting a document I was treating KeyExists as a consistency error to catch cases where you're inserting a new document and that document already exists. Is the SDK also returning KeyExists for updates to existing documents?

@MikeGoldsmith
Copy link
Contributor Author

I would have expected it to be "Success"

@brantburnett
Copy link
Collaborator

@MikeGoldsmith

On my machine this test is currently passing.

  1. Using current "master" branch (with SDK 2.3.10)
  2. Using Server 4.6.0-3453 Enterprise Edition (build-3453) (Developer preview released at Connect)

Brant

@MikeGoldsmith
Copy link
Contributor Author

@brantburnett

My cluster is two 4.5.1-2844 Enterprise Edition (build-2844) nodes. I'll check to see if I get the same on 4.6.0.

@MikeGoldsmith
Copy link
Contributor Author

MikeGoldsmith commented Dec 21, 2016

Hmm, the test also passes for me when using 4.6.0-3558 Enterprise Edition (build-3558).

@jeffrymorris @brantburnett Can one of you verify if you see this test fail with server 4.5.1 please? It may be a 4.5.1 server bug.

@jeffrymorris
Copy link
Contributor

@MikeGoldsmith @brantburnett - i have a 4.5.1 cluster I can test against.

@MikeGoldsmith
Copy link
Contributor Author

@jeffrymorris have you had any luck reproducing this bug?

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

3 participants