Uploaded image for project: 'Couchbase C client library libcouchbase'
  1. Couchbase C client library libcouchbase
  2. CCBC-1373

KV operations on scope and/or collection that doesn't exist should retry till timeout

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.7
    • 3.1.2
    • library
    • None
    • 1

    Description

      When implementing transactions, I noticed that the fit performer tests expected a kv operation against a collection/scope that doesn't exist to retry until the operation times out.  However, lcb returns an LCB_ERR_SCOPE_NOT_FOUND or LCB_ERR_COLLECTION_NOT_FOUND in this situation.  The tests verify it: https://github.com/couchbase/libcouchbase/blob/7f0afd1bc7b647aec4f4b12532a8afccafa2c1b2/tests/iotests/t_collections.cc#L240 for instance.  

      Checking with other sdks, go and java both would retry internally until the op times out.  I've worked around it in the client for txns for now, but I'd love to remove my workaround.

      Attachments

        Issue Links

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

          Activity

            david.kelly David Kelly added a comment -

            Against 3.0.7, they do retry.  However, when they finish, they return the LCB_ERR_COLLECTION_NOT_FOUND or LCB_ERR_SCOPE_NOT_FOUND.  So - I think we just need to return LCB_ERR_TIMEOUT, with the reason in the context perhaps?  Something like that.

            david.kelly David Kelly added a comment - Against 3.0.7, they do retry.  However, when they finish, they return the LCB_ERR_COLLECTION_NOT_FOUND or LCB_ERR_SCOPE_NOT_FOUND.  So - I think we just need to return LCB_ERR_TIMEOUT, with the reason in the context perhaps?  Something like that.
            david.kelly David Kelly added a comment -

            When I run my tests, I try to do an operation (get or upsert) after setting either the collection or the collection and the scope both to something that doesn't exist. Sometimes I get an LCB_ERR_TIMEOUT, sometimes I get an LCB_ERR_NETWORK.

            I'm thinking this should be consistently giving me the LCB_ERR_TIMEOUT.

            david.kelly David Kelly added a comment - When I run my tests, I try to do an operation (get or upsert) after setting either the collection or the collection and the scope both to something that doesn't exist. Sometimes I get an LCB_ERR_TIMEOUT, sometimes I get an LCB_ERR_NETWORK. I'm thinking this should be consistently giving me the LCB_ERR_TIMEOUT.

            Build couchbase-server-7.0.0-5043 contains libcouchbase commit cdd632f with commit message:
            CCBC-1373: do not send collection in the key

            build-team Couchbase Build Team added a comment - Build couchbase-server-7.0.0-5043 contains libcouchbase commit cdd632f with commit message: CCBC-1373 : do not send collection in the key

            Build couchbase-server-7.0.0-5043 contains libcouchbase commit 5faa1f0 with commit message:
            CCBC-1373: when retrying GETCID return TIMEOUT error

            build-team Couchbase Build Team added a comment - Build couchbase-server-7.0.0-5043 contains libcouchbase commit 5faa1f0 with commit message: CCBC-1373 : when retrying GETCID return TIMEOUT error

            People

              avsej Sergey Avseyev
              david.kelly David Kelly
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty