1. Apr 29, 2015
  2. Apr 25, 2015
  3. Apr 23, 2015
  4. Apr 22, 2015
  5. Apr 12, 2015
  6. Apr 11, 2015
  7. Apr 09, 2015
  8. Apr 08, 2015
    • A. Jesse Jiryu Davis's avatar
      Merge branch 'pr-193' · efa816a2
      A. Jesse Jiryu Davis authored
      # By Jason Carey (hanumantmk)
      # Via Jason Carey (hanumantmk)
      * pr-193:
        prerelease version
      
      Conflicts:
      	CMakeLists.txt
      	build/autotools/Versions.m4
      efa816a2
  9. Apr 07, 2015
  10. Apr 06, 2015
  11. Apr 05, 2015
  12. Apr 03, 2015
  13. Apr 02, 2015
  14. Mar 27, 2015
    • Jeremy Mikola's avatar
      CDRIVER-580: fsync or j in write concern imply GLE · 4c2af639
      Jeremy Mikola authored
      The fsync and journal options should imply a GLE; however, they logically conflict with w=0 and w=-1, so the write concern should be considered invalid with errors raised during URI parsing or write command execution.
      
      If fsync or journal have been specified (true or false), they should be included in the write concern BSON.
      4c2af639
  15. Mar 25, 2015
  16. Mar 24, 2015
    • Andrew Clayton's avatar
      client pool: Prevent a deadlock in mongoc_client_pool_pop() · 52b8f7fa
      Andrew Clayton authored
      I was seeing deadlocks in the client when it lost contact with mongo.
      The client was getting stuck on a futex in mongoc_client_pool_pop(),
      specifically
      
          mongoc_cond_wait(&pool->cond, &pool->mutex);
      
      and never making any progress even when mongo came back on-line.
      
      This problem was introduced by commit a8c1da45
      
       ("Client pool tries to
      repair unhealthy connections...") which started shutting down excess
      connections, i.e where there were more connections than minPoolSize.
      
      As part of this it would also decrement pool->size. This all happens in
      mongoc_client_pool_push()
      
      The problem here was that if you had a single active connection and a
      minPoolSize of 0 (the default) then it would try to remove the oldest
      client from the queue (in this case there wasn't one) and then decrement
      pool->size.
      
      pool->size would now be 0.
      
      Then we move into the trying to deal with duff connections part of the
      above commit. In this case, with no working mongo, it will want to
      destroy this connection, which it does but it will also again decrement
      pool->size, which now equals -1, except pool->size is a unit32_t
      
      Then in mongoc_client_pool_pop() we have this check
      
           if (pool->size < pool->max_pool_size) {
      
      pool->size is now some _large_ number, UINT32_MAX perhaps. and so that
      evaluates to false and then we move to the else branch which then
      executes
      
          mongoc_cond_wait(&pool->cond, &pool->mutex);
      
      and this is where we get stuck. It thinks there is too many connections
      and at the same time nothing is ever going to be returned to the queue
      (we only had a single active connection) and even we did return a
      connection to the pool, UINT32_MAX - 1 is still likely going to be >
      pool->max_pool_size.
      
      So to avoid this problem we simply don't want to try and remove
      connections from the queue that don't exist and more importantly don't
      decrement pool->size when we don't actually remove an old connection.
      
      After this change, I can start mango, start the client, kill mongo,
      client shows errors, but keeps trying to re-connect, restart mongo and
      client is then happy again.
      
      Signed-off-by: default avatarAndrew Clayton <andrew@digital-domain.net>
      
      Closes #187
      52b8f7fa
    • Andrew Clayton's avatar
      client pool: Add some missing locking in _push() · dc9e04b1
      Andrew Clayton authored
      Commit a8c1da45
      
       ("Client pool tries to repair unhealthy connections...")
      introduced more code to mongoc_client_pool_push() operating on the
      connection pool. However locking was missing on the first if () section
      which deals with various aspects of the connection pool and requires
      locking.
      
      Protect the if () with a mongoc_mutex_lock/unlock using pool->mutex.
      
      Signed-off-by: default avatarAndrew Clayton <andrew@digital-domain.net>
      dc9e04b1
    • Jason Carey (hanumantmk)'s avatar
      CDRIVER-588 avoid cluster_try_sendv · dce728c6
      Jason Carey (hanumantmk) authored
      Avoid the use of cluster_try_sendv for healthy and unhealthy clusters.
      It just needlessly avoids reconnects and persists the same errors.
      dce728c6
  17. Mar 21, 2015
  18. Mar 17, 2015