MongoServer.Ping() has possible race condition

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • 1.4.2
    • Affects Version/s: 1.4.1
    • Component/s: None
    • None
    • None
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None

      public virtual void Ping()
      {
      foreach (var instance in _instances.ToArray())

      { instance.Ping(); }

      }

      _instances.ToArray() isn't thread safe, I guess that iterating over the result of MongoServer.Instances property (that does locking inside) should be better.

            Assignee:
            Craig Wilson
            Reporter:
            Aristarkh Zagorodnikov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: