Uploaded image for project: 'Couchbase Java Client'
  1. Couchbase Java Client
  2. JCBC-796

Explore implementing a callback-based mutation like in go-couchbase

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Won't Do
    • Minor
    • .backlog
    • None
    • None
    • Security Level: Public
    • None

    Description

      In the (now being deprecated in favor of the gocb SDK) go-couchbase library, there is an interesting semantic for retrying a mutation transparently if CAS doesn't match:
      you provide a callback that, given the bytes of the document, mutates the document content as you'd like, and the library will keep trying to apply this mutation if the CAS doesn't match by fetching the latest version and retrying the callback.

      You need a mean of interrupting this loop either through a configurable "max tries" parameters or conditionally based on the doc's content from inside the callback.

      This could be interesting to explore this idea and implement it in other SDKs like the Java SDK.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            daschl Michael Nitschinger
            simonbasle Simon Baslé (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty