Tagging in CouchBase
Any solutions for Tagging in couchbase.
Is Append operation holds a lock on the object ?
So let me answer your question in 2 steps:
1- Just to be sure you know it, the "append" operation does not do anything with JSON. It just append the object at the end of the object stored into Couchbase value. (It is NOT appending a 'thing' to a JSON attribute). Take a look to this part of the documentation:
2- To do Tagging, as you may know Couchbase API use the full JSON document back and forth, and you do the parsing and JSON work yourself in the application. (and I am supposing here that you put the tags inside the document)
So if you want to be sure that only 1 person/thread update the document you have to use the "Check and Swap" (CAS) approach, and associated operations. You have a full example here: