-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.0
-
Component/s: None
-
None
The BsonBuffer used in MongoReplyMessage<TDocument> MongoConnectionReceiveMessage<TDocument>(MongoServer) is not disposed, so its chunks aren't released back to the internal chunk pool.
Adding "using (var buffer...)" around the try clause body fixes this.
Also, I believe that MongoReplyMessage.ReadFrom(BsonBuffer) should include similar treatment for the BsonReader (this won't affect anything now, but future development might change this).
I would also recommend to make chunk pool limit, which is currently 64, to be configurable and probably scale with number of processors by default. With heavy traffic