Can we Create,Delete and Create document with same ID?

Hi,
Can we create a document and Delete a document and create a document with the Same ID by using Couchbase Mobile Lite iOS SDK?

Example: Create a Document with ID ‘Doc_1’ in Couchbase Mobile Lite iOS and do some operations on document and revisions will be 10_xxx and now delete a document from mobile lite and it will delete form Mobile Lite, Sync gateway and Server. So after you can create a document with the same id ‘Doc_1’. This document is not creating immediately.

How can we achieve this? Please share the correct documentation for this.

Yes, you can do this. Have you tried it? If it didn’t work correctly, please describe in detail what you did, what you expected to happen, and what actually happened.

Hi Jens, Thank you for your response.

Document not created and received conflict errors.

Steps to Reproduce:

  1. Create a Document with our own Document ID (For Example Doc_1 ) from iOS app using CBL 2.7 SDK
  2. Do some operations Document (Doc_1) and Then revision will be 100_xxx
  3. Now Delete document from iOS App using CBL 2.7 SDK
  4. So If we search this document from Server, it will not found. But if we search with Sync gateway Public Rest API it will give result like reason: “deleted” and error: “Not Found”.
  5. Now create same a document with same Document ID (Doc_1). In Mobile Lite Document created with revision ID 1_xxx and giving 409 conflict error. Here revision ID 1_xxx because when we delete document it will not available in our mobile phone.

Is it cause of tombstones? Because tombstone always wins over a documentation update?

More details on this please?

Jens, We are customer to Couchbase. So we posted with all the logs and other details to Support Team.
So you can find details from there and you can check following ticket.

https://support.couchbase.com/hc/en-us/requests/33023

I don’t have access to that server. Your SE should be able to answer your questions.

In general, going through multiple forums at the same time is confusing for the people answering questions. Try to stick to one.

Jens, It’s ok.

But what I observed from Couchbase Support. We are paying money for License and Support. But Forums giving a quick response then SE.

I hope to take this as feedback and forward it to your team.

Thank you.