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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.5
    • 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
    • Component/s: None

      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

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

              Created:
              Updated:
              Resolved: