| 1 | { |
| 2 | "description": "writeErrors field is ignored", |
| 3 | "uri": "mongodb://a/?replicaSet=rs", |
| 4 | "phases": [ |
| 5 | { |
| 6 | "description": "Primary A is discovered", |
| 7 | "responses": [ |
| 8 | [ |
| 9 | "a:27017", |
| 10 | { |
| 11 | "ok": 1, |
| 12 | "helloOk": true, |
| 13 | "isWritablePrimary": true, |
| 14 | "hosts": [ |
| 15 | "a:27017" |
| 16 | ], |
| 17 | "setName": "rs", |
| 18 | "minWireVersion": 0, |
| 19 | "maxWireVersion": 9, |
| 20 | "topologyVersion": { |
| 21 | "processId": { |
| 22 | "$oid": "000000000000000000000001" |
| 23 | }, |
| 24 | "counter": { |
| 25 | "$numberLong": "1" |
| 26 | } |
| 27 | } |
| 28 | } |
| 29 | ] |
| 30 | ], |
| 31 | "outcome": { |
| 32 | "servers": { |
| 33 | "a:27017": { |
| 34 | "type": "RSPrimary", |
| 35 | "setName": "rs", |
| 36 | "topologyVersion": { |
| 37 | "processId": { |
| 38 | "$oid": "000000000000000000000001" |
| 39 | }, |
| 40 | "counter": { |
| 41 | "$numberLong": "1" |
| 42 | } |
| 43 | }, |
| 44 | "pool": { |
| 45 | "generation": 0 |
| 46 | } |
| 47 | } |
| 48 | }, |
| 49 | "topologyType": "ReplicaSetWithPrimary", |
| 50 | "logicalSessionTimeoutMinutes": null, |
| 51 | "setName": "rs" |
| 52 | } |
| 53 | }, |
| 54 | { |
| 55 | "description": "Ignore command error with writeErrors field", |
| 56 | "applicationErrors": [ |
| 57 | { |
| 58 | "address": "a:27017", |
| 59 | "when": "afterHandshakeCompletes", |
| 60 | "maxWireVersion": 9, |
| 61 | "type": "command", |
| 62 | "response": { |
| 63 | "ok": 1, |
| 64 | "writeErrors": [ |
| 65 | { |
| 66 | "errmsg": "NotPrimaryNoSecondaryOk", |
| 67 | "code": 13435, |
| 68 | "index": 0 |
| 69 | } |
| 70 | ] |
| 71 | } |
| 72 | } |
| 73 | ], |
| 74 | "outcome": { |
| 75 | "servers": { |
| 76 | "a:27017": { |
| 77 | "type": "RSPrimary", |
| 78 | "setName": "rs", |
| 79 | "topologyVersion": { |
| 80 | "processId": { |
| 81 | "$oid": "000000000000000000000001" |
| 82 | }, |
| 83 | "counter": { |
| 84 | "$numberLong": "1" |
| 85 | } |
| 86 | }, |
| 87 | "pool": { |
| 88 | "generation": 0 |
| 89 | } |
| 90 | } |
| 91 | }, |
| 92 | "topologyType": "ReplicaSetWithPrimary", |
| 93 | "logicalSessionTimeoutMinutes": null, |
| 94 | "setName": "rs" |
| 95 | } |
| 96 | } |
| 97 | ] |
| 98 | } |