Uploaded image for project: 'Couchbase node.js Client Library'
  1. Couchbase node.js Client Library
  2. JSCBC-1107

partition id and sequence number are swapped in mutation token

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • 4.2.0
    • 4.1.3
    • library
    • None
    • 1

    Description

      When the SDK constructs a mutation token it does so in this order

      https://github.com/couchbase/couchnode/blob/1ccbf734fda2b9e87d414894c131b13ce0cec852/src/mutationtoken.cpp#L64-L66

          return couchbase::mutation_token{
              tokenData.partitionUuid, tokenData.partitionId,
              static_cast<uint16_t>(tokenData.sequenceNumber), tokenData.bucketName};
      

      however the definition defines them in this order

          explicit mutation_token(std::uint64_t partition_uuid,
                                  std::uint64_t sequence_number,
                                  std::uint16_t partition_id,
                                  std::string bucket_name)
            : partition_uuid_{ partition_uuid }
            , sequence_number_{ sequence_number }
            , partition_id_{ partition_id }
            , bucket_name_{ std::move(bucket_name) }
      

      This leads to the partition id and sequence number being swapped and any query using consistentWith timing out because the nonexistent mutation is never processed

      Attachments

        For Gerrit Dashboard: JSCBC-1107
        # Subject Branch Project Status CR V

        Activity

          People

            jared.casey Jared Casey
            jake.rawsthorne Jake Rawsthorne
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty