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: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: 6.12.0
    • Component/s: None
    • 2
    • 5
    • None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • 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. reproduction.tar.gz
          140 kB
          Neal Beeken
        2. reproduction_with_full_logging.js
          4 kB
          Bailey Pearson
        3. replica_set_mongo_6.13.0-2.txt
          4 kB
          Sergey Popov
        4. replica_set_mongo_6.13.0-1.txt
          3 kB
          Sergey Popov
        5. neal_version_nodejs_22.14.0.txt
          15 kB
          Sergey Popov
        6. neal_version_nodejs_20.12.1.txt
          16 kB
          Sergey Popov
        7. neal_version_mongo_driver_4_17_2.txt
          15 kB
          Sergey Popov

            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: