Uploaded image for project: 'Java Couchbase JVM Core'
  1. Java Couchbase JVM Core
  2. JVMCBC-1151

Return CAS value inside Transaction context calls (eg. CoreTransactionGetResult)

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • None
    • Core
    • None
    • 1

    Description

      The `cas` value is not available in the returned objects inside transactions.

      We had to use java reflection to locate and read the cas value.
       We need the cas value in our use cases from an insert/replace calls.

      (Use case: We return the cas value in our API for later updates with optimistic locking)

      Demonstration code provided:

      https://github.com/spirostz/couchbase-transactions/blob/main/src/test/java/org/spiros/CouchbaseTransactionsTest.java

      See: "Problem 2 non-proper solution" in the code below

      Attachments

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

        Activity

          People

            graham.pople Graham Pople
            spiros Spiros Tzoras
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty