Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-810

mongoc_cluster_disconnect_node() doesn't disconnect it in single threaded mode

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.2-rc0
    • Affects Version/s: 1.2-beta0
    • Component/s: None
    • None

      When mongoc_cluster_try_recv() fails for example with a timeout, the node is disconnected using mongoc_cluster_disconnect_node().
      The mongoc_cluster_disconnect_node() is implemented :

      void                                                                                     
      mongoc_cluster_disconnect_node (mongoc_cluster_t *cluster, uint32_t server_id)           
      {                                                                                        
         if (cluster->client->topology->single_threaded) {                                     
            return;                                                                            
         }                                                                                     
                                                                                               
         mongoc_set_rm(cluster->nodes, server_id);                                             
      }                            
      

      In the case where the caller calls mongoc_topology_invalidate_server() works out in the end, but that is not always the case (like destroying cursor in exhaust mode, or writev_full() failure)

            Assignee:
            bjori Hannes Magnusson
            Reporter:
            bjori Hannes Magnusson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: