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

Server_Description update with lastUpdateTime / lastWriteDate fields is ignored in topology

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.3.4, 3.3.5, 3.4.0, 3.5.0, 3.4.1, 3.5.1, 3.5.2, 3.5.3, 3.5.4
    • Fix Version/s: 3.5.5
    • Component/s: None
    • Labels:
    • MongoDB Version:
      3.6.16
    • Case:

      Description

      We found and issue with 3.5.3 driver and unifiedTopology = true:

      Server description with lastUpdateTime / lastWriteDate fields updated is ignored in topology.

       

      By Spec Server_DEscription must be update with new one on every isMaster response.

      But Topology ignores Server_Description if previous Server_Description considered equal to new one.

      Server_Description::equals()does not account for lastWriteDate lastUpdateTime and some other fields.

       

      This can cause bugs when selecting server by staleness

       

      We found issue by attaching to working server and adding breakpoints to Topology::serverUpdateHandler() and Topology_Description::update().

      Topology_Description::update() was not called for 30 minuted. and Topology::serverUpdateHandler() was constantly called with new Server_Description but it never updated description cause previous one was always considered equal to new one.

       

      This behavior was introduced in 3.3.4 driver

        Attachments

          Activity

            People

            Assignee:
            eric.adum Eric Adum
            Reporter:
            armen.shakhbazian@gmail.com Armen Shakhbazian
            Participants:
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: