checked out sockets in connection.rb are not checked in if the transaction is interrupted by an Exception

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Minor - P4
    • 12_01_17
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      Ruby 1.8.7, os independent
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      If one has, for example:

      SystemTimer::timeout(10)
      obj_cache.each do |obj|
      mongo_collection.save( obj )
      end
      end

      ...and the Timeout is raised while a socket is checked out from the pool, it won't be available again. Thus there might be no more connections available.

      patch attached.

        1. mongo_connection_patch.txt
          3 kB
          Sebastian Geidies

            Assignee:
            Kyle Banker (Inactive)
            Reporter:
            Sebastian Geidies
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: