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

Ensure XDCR does not generate DCP connection names that are no longer than allowed by memcached

    XMLWordPrintable

Details

    Description

      DCP connections with long names break the STATS "dcp" command. (See MB-34280). XDCR should generate names that are no longer than the memcached limit.

      Attachments

        Issue Links

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

          Activity

            lilei.chen Lilei Chen added a comment -

            The DCP name XDCR uses is xdcr:<dcpId>:<randomId> where part of dcpId is the source and target bucket names. Here is an example where bucket names are B1 and B2:
            xdcr:dcp_65713400edc789b05d26283428a2af88/B1/B2_127.0.0.1:12000_0:2OvLVhrDQddiFjP4shItBQ==

            If I create source/target buckets with name length 100 (which is the limit):
            a123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
            and create replication, DCP connection will fail with error:

            2020-12-01T10:35:42.402-08:00 ERRO GOXDCR.PipelineMgr: Failed to update pipeline 65713400edc789b05d26283428a2af88/a123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789/a123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789, err=dcp_65713400edc789b05d26283428a2af88/a123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789/a123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789_127.0.0.1:12000_0 : MCResponse status=EINVAL, opcode=UPR_OPEN, opaque=3199139960, msg: {"error":{"context":"Key length exceeds 251"}}

            If I create source/target buckets with slightly shorter name (75 bytes):
            a12345678901234567890123456789012345678901234567890123456789012345678901234
            and create replication, DCP connection will fail with error:

            2020-12-01T10:53:01.634-08:00 ERRO GOXDCR.PipelineMgr: Update of pipeline 65713400edc789b05d26283428a2af88/a12345678901234567890123456789012345678901234567890123456789012345678901234/a12345678901234567890123456789012345678901234567890123456789012345678901234 failed with errors=dcp_65713400edc789b05d26283428a2af88/a12345678901234567890123456789012345678901234567890123456789012345678901234/a12345678901234567890123456789012345678901234567890123456789012345678901234_127.0.0.1:12000_0 : MCResponse status=EINVAL, opcode=UPR_OPEN, opaque=3199139941, msg: {"error":{"context":"Dcp name limit is 200 characters"}}

            lilei.chen Lilei Chen added a comment - The DCP name XDCR uses is xdcr:<dcpId>:<randomId> where part of dcpId is the source and target bucket names. Here is an example where bucket names are B1 and B2: xdcr:dcp_65713400edc789b05d26283428a2af88/B1/B2_127.0.0.1:12000_0:2OvLVhrDQddiFjP4shItBQ== If I create source/target buckets with name length 100 (which is the limit): a123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 and create replication, DCP connection will fail with error: 2020-12-01T10:35:42.402-08:00 ERRO GOXDCR.PipelineMgr: Failed to update pipeline 65713400edc789b05d26283428a2af88/a123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789/a123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789, err=dcp_65713400edc789b05d26283428a2af88/a123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789/a123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789_127.0.0.1:12000_0 : MCResponse status=EINVAL, opcode=UPR_OPEN, opaque=3199139960, msg: {"error":{"context":"Key length exceeds 251"}} If I create source/target buckets with slightly shorter name (75 bytes): a12345678901234567890123456789012345678901234567890123456789012345678901234 and create replication, DCP connection will fail with error: 2020-12-01T10:53:01.634-08:00 ERRO GOXDCR.PipelineMgr: Update of pipeline 65713400edc789b05d26283428a2af88/a12345678901234567890123456789012345678901234567890123456789012345678901234/a12345678901234567890123456789012345678901234567890123456789012345678901234 failed with errors=dcp_65713400edc789b05d26283428a2af88/a12345678901234567890123456789012345678901234567890123456789012345678901234/a12345678901234567890123456789012345678901234567890123456789012345678901234_127.0.0.1:12000_0 : MCResponse status=EINVAL, opcode=UPR_OPEN, opaque=3199139941, msg: {"error":{"context":"Dcp name limit is 200 characters"}}

            Build couchbase-server-7.0.0-3924 contains goxdcr commit 05e0514 with commit message:
            MB-37283: Ensure DCP connection name is under 200 bytes

            build-team Couchbase Build Team added a comment - Build couchbase-server-7.0.0-3924 contains goxdcr commit 05e0514 with commit message: MB-37283 : Ensure DCP connection name is under 200 bytes

            Verified on 7.0.0-4797. No error seen when replication with src and target bkt name as a123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 is created.

            pavithra.mahamani Pavithra Mahamani added a comment - Verified on 7.0.0-4797. No error seen when replication with src and target bkt name as a123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 is created.

            People

              lilei.chen Lilei Chen
              owend Daniel Owen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty