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

          Build couchbase-server-6.5.1-6228 contains kv_engine commit 2f2ce63 with commit message:
          MB-37342: Replace returns ENOENT if SW in-flight but doc does not exists

          build-team Couchbase Build Team added a comment - Build couchbase-server-6.5.1-6228 contains kv_engine commit 2f2ce63 with commit message: MB-37342 : Replace returns ENOENT if SW in-flight but doc does not exists
          paolo.cocchi Paolo Cocchi added a comment -

          Hi Ashwin Govindarajulu,
          fixed merged, could you verify on your side please?
          Thank you, Paolo

          paolo.cocchi Paolo Cocchi added a comment - Hi Ashwin Govindarajulu , fixed merged, could you verify on your side please? Thank you, Paolo

          Build couchbase-server-7.0.0-1546 contains kv_engine commit 2f2ce63 with commit message:
          MB-37342: Replace returns ENOENT if SW in-flight but doc does not exists

          build-team Couchbase Build Team added a comment - Build couchbase-server-7.0.0-1546 contains kv_engine commit 2f2ce63 with commit message: MB-37342 : Replace returns ENOENT if SW in-flight but doc does not exists

          Works as expected. Verified on 6.5.1 build 6233.

          Closing this bug.

          ashwin.govindarajulu Ashwin Govindarajulu added a comment - Works as expected. Verified on 6.5.1 build 6233. Closing this bug.

          Build couchbase-server-6.6.0-7519 contains kv_engine commit 2f2ce63 with commit message:
          MB-37342: Replace returns ENOENT if SW in-flight but doc does not exists

          build-team Couchbase Build Team added a comment - Build couchbase-server-6.6.0-7519 contains kv_engine commit 2f2ce63 with commit message: MB-37342 : Replace returns ENOENT if SW in-flight but doc does not exists

          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