Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-6630

find() query stucks upto 20 seconds when primary switches back after stepDown() period is finished

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 6.16.0
    • Affects Version/s: 6.12.0
    • Component/s: None
    • 2
    • 5
    • Not Needed
    • None
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      Setup

      • OS: Ubuntu 20.04.4
      • mongod --version
        db version v6.0.16
        Build Info: {
            "version": "6.0.16",
            "gitVersion": "1bbe71e91a41b097b19d036dee47b861b3f27181",
            "openSSLVersion": "OpenSSL 1.1.1f  31 Mar 2020",
            "modules": [],    "allocator": "tcmalloc",
            "environment": {
                "distmod": "ubuntu2004",
                "distarch": "x86_64",
                "target_arch": "x86_64"
            }{}}

      Step to reproduce

      Exactly same as in NODE-4783.

      Issue

      After mongod1 becomes PRIMARY again, find() requests stuck for up to 20 seconds.

      NODE-4783 was fixed for driver 4.x and it works properly, new issue found in 6.12.


      Acceptance Criteria

      Implementation Requirements

      • Add multi-message processing to the SizedMessageTransform
        • A single chunk may contain multiple messages, all of them should be pushed to the stream as they arrive

      Testing Requirements

      • Check that the SizedMessageTransform handles multiple messages
        • multiple full messages and partials
        • check no full messages need to be "pushed" out by the arrival of another

      Documentation Requirements

      • None

      Follow Up Requirements

      • Consider re-introducing the hello-skipping as an optimization

        1. replica_set_mongo_6.13.0-1.txt
          3 kB
        2. replica_set_mongo_6.13.0-2.txt
          4 kB
        3. reproduction.tar.gz
          140 kB
        4. neal_version_nodejs_20.12.1.txt
          16 kB
        5. neal_version_nodejs_22.14.0.txt
          15 kB
        6. neal_version_mongo_driver_4_17_2.txt
          15 kB
        7. reproduction_with_full_logging.js
          4 kB

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            sergeyp@brightdata.com Sergey Popov
            Bailey Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: