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

Support SubdocArrayInsert + doc_flag::Add for MultiMutation

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • Morpheus
    • Cheshire-Cat
    • memcached
    • None
    • 1

    Description

      From http://review.couchbase.org/c/kv_engine/+/121498:

      // @todo: This test fails because doc_flag::Mkdoc is invalid with ArrayInsert (
      //  the test fails at validation for ArrayInsert with "Invalid arguments")
      //  By changing to doc_flag::Add (which is valid for ArrayInsert) the test
      //  gets to the execution of ArrayInsert but is fails with
      //  SubdocMultiPathFailure.
      //  Specific and simple (single-path) tests on ArrayInsert suggests that we may
      //  have some existing issue in that area that we should address in a dedicated
      //  patch.
      TEST_P(XattrNoDocTest,
             DISABLED_AddUserXattrToNonExistentItemMultipathArrayInsert) {
          BinprotSubdocMultiMutationCommand cmd(
                  name,
                  {{ClientOpcode::SubdocArrayPushFirst,
                    SUBDOC_FLAG_XATTR_PATH,
                    "array",
                    "0"},
                   {ClientOpcode::SubdocArrayInsert,
                    SUBDOC_FLAG_XATTR_PATH,
                    "array.[0]",
                    "1"}},
                  doc_flag::Mkdoc | doc_flag::CreateAsDeleted);
       
          auto resp = subdocMultiMutation(cmd);
          EXPECT_EQ(cb::mcbp::Status::SubdocSuccessDeleted, resp.getStatus());
       
          resp = subdoc_get("array", SUBDOC_FLAG_XATTR_PATH, doc_flag::AccessDeleted);
          ASSERT_EQ(cb::mcbp::Status::SubdocSuccessDeleted, resp.getStatus());
          EXPECT_EQ("[0,1]", resp.getValue());
      }
      

      Attachments

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

        Activity

          People

            paolo.cocchi Paolo Cocchi
            paolo.cocchi Paolo Cocchi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty