Hello,
one of my applications crashed because the mongocsharp driver started throwing exception about not using the master.
It is likely to be related to the change of master of one replicaset has changed during the process.
Is the driver supposed to handle this case or should I disconnect/reconnect to the server ?
2011-10-03 15:02:33.768 ; VERBOSE ; Problem processing message: { "ip" : "10.120.6.4", "pId" : 3804, "pType" : "Persister", "messageType" : "b", "partnerName" : "fixme", "t" : ISODate("2011-10-03T13:02:30.149Z") } ; Warning ;
MongoSafeModeException := Safemode detected an error 'not master'. (Response was { "singleShard" : "shard1/
10.121.9.1:27021,
10.120.9.1:27021", "err" : "not master", "code" : 10058, "n" : 0, "lastOp" : NumberLong("5659250514974474241"), "connectionId" : 2475, "ok" : 1.0 }).
at MongoDB.Driver.Internal.MongoConnection.SendMessage(MongoRequestMessage message, SafeMode safeMode) in C:\source\mongo-csharp-driver\Driver\Internal\MongoConnection.cs:line 450
at MongoDB.Driver.MongoCollection.InsertBatch(Type nominalType, IEnumerable documents, MongoInsertOptions options) in C:\source\mongo-csharp-driver\Driver\Core\MongoCollection.cs:line 1033
at MongoDB.Driver.MongoCollection.Insert(Type nominalType, Object document, MongoInsertOptions options) in C:\source\mongo-csharp-driver\Driver\Core\MongoCollection.cs:line 885
at MongoDB.Driver.MongoCollection.Insert(Type nominalType, Object document, SafeMode safeMode) in C:\source\mongo-csharp-driver\Driver\Core\MongoCollection.cs:line 902
at MongoDB.Driver.MongoCollection.Insert(Type nominalType, Object document) in C:\source\mongo-csharp-driver\Driver\Core\MongoCollection.cs:line 867
at MongoDB.Driver.MongoCollection.Insert[TNominalType](TNominalType document) in C:\source\mongo-csharp-driver\Driver\Core\MongoCollection.cs:line 826
at CatalogImport.Monitor.doMonitorBsonMessage(BsonDocument bdoc) in C:\catalog-importGIT\tools\src\CatalogImport\Process\Monitor\Monitor.cs:line 111
Grégoire