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

AbstractCursor getMores should run serverSelection to ensure monitoring updates are respected

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Critical - P2 Critical - P2
    • 4.2.1
    • Affects Version/s: None
    • Component/s: Lambda
    • 8
    • Not Needed

      What problem are you facing?

      The AbstractCursor maintains a reference to the server it is executing against, in someway a cursor does need to know which server to go back to for getMore commands, but instead of running getMore on that saved server. The cursor should instead run server selection (selecting only for the same server it holds a reference to) to make sure that it is still in a selectable state.

      The current issue that arrises is that the saved server could have transitioned to Unknown between the time the find was sent and when it is time to send the getMore. It could be recovering, it could not be, but by running server selection we give the driver time to determine that.

      What driver and relevant dependency versions are you using?

      4.x driver

      Steps to reproduce?

      See linked ticket

            Assignee:
            durran.jordan@mongodb.com Durran Jordan
            Reporter:
            neal.beeken@mongodb.com Neal Beeken
            Neal Beeken
            Votes:
            5 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: