Concurrent updates

@ppliatsik I’m pretty sure what you want is compare and swap (cas). On every get, the Document has the cas value set automatically. When you then call bucket.replace() with the new document, the server will only allow it to pass when the cas on the server side is the same you automatically pass in. If not, you’ll get a CASMismatchException and then you can implement a “do/while” loop, rinse and repeat.