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

[Durability]: Replace for the document in sync_write returns SyncWriteInProgress

    XMLWordPrintable

Details

    • Untriaged
    • Centos 64-bit
    • No
    • KV Spint 2020-March

    Description

      Build: 6.5.0-4959

      Scenario:

      • 2 node cluster, couchbase bucket(replica=1)
      • Stop memcached on replica node
      • INSERT a new doc into the bucket with timeout=60seconds using client-1 with durability=MAJORITY
      • Try REPLACE of same doc from client-2

      Observation:

      Client-2 gets 'RequestCancelledException' with reason 'KV_SYNC_WRITE_IN_PROGRESS' for the replace request.

      [subdoc_xattr:test_doc_sync_write_in_progress:1661] Testing replace over create
      [sdk_client3:replace:507] Request cancelled/timed-out: com.couchbase.client.core.error.RequestCanceledException: ReplaceRequest {"cancelled":true,"completed":true,"coreId":1,"idempotent":false,"lastChannelId":"0000000000000001/000000000DEDC0B3","lastDispatchedFrom":"10.112.191.1:51579","lastDispatchedTo":"10.112.191.102:11210","reason":"NO_MORE_RETRIES (KV_SYNC_WRITE_IN_PROGRESS)","requestId":51,"requestType":"ReplaceRequest","retried":0,"service":{"bucket":"default","collection":"_default","documentId":"xattrs-0","opaque":"0x5e","scope":"_default","syncDurability":{"present":true},"type":"kv"},"timeoutMs":3000,"timings":{"dispatchMicros":842,"totalMicros":1989}}
      

      Expected behavior:

      Client-2 should get 'DocumentNotFoundException' since the replace is supposed to get the committed document from the bucket.

      Since client-1 sync_write is still in progress, the document should not be exposed to client-2's replace request.

      Note:

      Currently DELETE over uncommitted document will get 'DocumentNotFoundException'

      Attachments

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

        Activity

          People

            ashwin.govindarajulu Ashwin Govindarajulu
            ashwin.govindarajulu Ashwin Govindarajulu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty