Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-36844

SDK "Exists" returns incorrect status for 'Recommit in Progress' SyncWrites

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 6.5.0
    • 6.5.0
    • clients
    • None
    • Untriaged
    • Unknown
    • KV-Engine Mad-Hatter GA

    Description

      In discussion with the KV engine team a mismatch has been discovered that is recorded in this ticket.

      The SDK right now uses a single observe call for the "exists" command. It allows for an easy way to check if a document exists without having to load it and it also returns the CAS as part of the ExistsResult.

      The whole logic can be boiled down to this. We ask the active and then:

      boolean exists = response.observeStatus() == ObserveViaCasResponse.ObserveStatus.FOUND_PERSISTED
                  || response.observeStatus() == ObserveViaCasResponse.ObserveStatus.FOUND_NOT_PERSISTED;
      

      The question came up if the exists command also needs to handle sync write re-commit in progress which it turns out KV engine currently doesn't consider.

      I think there are a couple options on the table, one thing to consider is: if we change OBSERVE we need to make sure that SDK 2.x observe-based durability is not impacted

      Attachments

        Issue Links

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

          Activity

            People

              daschl Michael Nitschinger
              daschl Michael Nitschinger
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty