-
Type:
Bug
-
Resolution: Works as Designed
-
Priority:
Major - P3
-
None
-
Affects Version/s: 2.9.0, 2.9.1, 2.9.2, 2.9.3, 2.10.0, 2.10.1
-
Component/s: Session Management
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
After upgrading the C# driver in our project from 2.8.1 to 2.10.1, we can no longer write changes to the database. We don't use sessions / transactions and have made no changes in our code. Downgrading to 2.8.1 resolves the issue. I've also confirmed the problem exists with 2.9.0 and 2.9.3.
The error is the following:
A write operation resulted in an error.
Transaction numbers are only allowed on a replica set member or mongos ---> SimpleInjector.ActivationException: The registered delegate for type Service threw an exception. A write operation resulted in an error.
Transaction numbers are only allowed on a replica set member or mongos ---> MongoDB.Driver.MongoWriteException: A write operation resulted in an error.
Transaction numbers are only allowed on a replica set member or mongos ---> MongoDB.Driver.MongoBulkWriteException`1[Kolonel.Gateway.Model.ProcessInstance]: A bulk write operation resulted in one or more errors.
Transaction numbers are only allowed on a replica set member or mongos
at MongoDB.Driver.MongoCollectionImpl`1.BulkWrite(IClientSessionHandle session, IEnumerable`1 requests, BulkWriteOptions options, CancellationToken cancellationToken)
Our environment:
--- Sharding Status ---
sharding version: {
"_id" : 1,
"minCompatibleVersion" : 5,
"currentVersion" : 6,
"clusterId" : ObjectId("59edff6a06737a532cb09d97")
}
shards:
{ "_id" : "shard0000", "host" : "tst-dbs01r1.cb.local:27018", "state" : 1 }
{ "_id" : "shard0001", "host" : "tst-dbs02r1.cb.local:27018", "state" : 1 }
active mongoses:
"3.6.14" : 3
autosplit:
Currently enabled: yes
balancer:
Currently enabled: yes
Currently running: no
Failed balancer rounds in last 5 attempts: 4
Last reported error: No route to host
Time of Reported error: Wed Sep 26 2018 11:58:42 GMT+0200 (CEST)
Migration Results for the last 24 hours:
No recent migrations
databases:
(...)