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

N1QL: Upsert command not working correctly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Test Blocker
    • 4.5.0
    • 4.5.0
    • query
    • 4.5.0-2023
    • Untriaged
    • Yes

    Description

      Issue an upsert query first time:
      UPSERT into `beer-sample` (key , value) VALUES ("key_test",

      {"test":123}

      );

      This works correctly, inserts a new key,value pair in bucket.

      Issue an upsert again with a different or same value, with same key:
      UPSERT into `beer-sample` (key , value) VALUES ("key_test",

      {"test123":12345}

      );

      This gives error:
      [

      { "code": 12009, "msg": "DML Error, possible causes include CAS mismatch or concurrent modificationFailed to perform insert - cause: Duplicate Key key_test" }

      ]

      Attachments

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

        Activity

          People

            marco.greco Marco Greco (Inactive)
            Prerna.Manaktala Prerna Manaktala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty