Issue with threads re-using previously released memory containing a Shard version

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Critical - P2
    • 2.2.2, 2.3.1
    • Affects Version/s: 2.0.6
    • Component/s: Sharding
    • None
    • ALL
    • None
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Diff with a simple fix built in version 2.0.6

      diff --git a/client/dbclient.h b/client/dbclient.h
      index ea55bb4..c305d4a 100644
      --- a/client/dbclient.h
      +++ b/client/dbclient.h
      @@ -114,7 +114,7 @@ namespace mongo {
           };
       
           class DBClientBase;
      -
      +extern boost::function1<void, DBClientBase*> resetShardVersionCB;
           /**
            * ConnectionString handles parsing different ways to connect to mongo and determining method
            * samples:
      @@ -747,7 +747,9 @@ namespace mongo {
               DBClientBase() {
                   _writeConcern = W_NORMAL;
               }
      -
      +        ~DBClientBase() {
      +           resetShardVersionCB( this );  
      +        }
               WriteConcern getWriteConcern() const { return _writeConcern; }
               void setWriteConcern( WriteConcern w ) { _writeConcern = w; }
      

              Assignee:
              Spencer Brody (Inactive)
              Reporter:
              David Hows (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: