...

Text file src/go.mongodb.org/mongo-driver/testdata/server-discovery-and-monitoring/errors/stale-topologyVersion-NotPrimaryOrSecondary.json

Documentation: go.mongodb.org/mongo-driver/testdata/server-discovery-and-monitoring/errors

     1{
     2  "description": "Stale topologyVersion NotPrimaryOrSecondary error",
     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 stale NotPrimaryOrSecondary error (topologyVersion less)",
    56      "applicationErrors": [
    57        {
    58          "address": "a:27017",
    59          "when": "afterHandshakeCompletes",
    60          "maxWireVersion": 9,
    61          "type": "command",
    62          "response": {
    63            "ok": 0,
    64            "errmsg": "NotPrimaryOrSecondary",
    65            "code": 13436,
    66            "topologyVersion": {
    67              "processId": {
    68                "$oid": "000000000000000000000001"
    69              },
    70              "counter": {
    71                "$numberLong": "0"
    72              }
    73            }
    74          }
    75        }
    76      ],
    77      "outcome": {
    78        "servers": {
    79          "a:27017": {
    80            "type": "RSPrimary",
    81            "setName": "rs",
    82            "topologyVersion": {
    83              "processId": {
    84                "$oid": "000000000000000000000001"
    85              },
    86              "counter": {
    87                "$numberLong": "1"
    88              }
    89            },
    90            "pool": {
    91              "generation": 0
    92            }
    93          }
    94        },
    95        "topologyType": "ReplicaSetWithPrimary",
    96        "logicalSessionTimeoutMinutes": null,
    97        "setName": "rs"
    98      }
    99    },
   100    {
   101      "description": "Ignore stale NotPrimaryOrSecondary error (topologyVersion equal)",
   102      "applicationErrors": [
   103        {
   104          "address": "a:27017",
   105          "when": "afterHandshakeCompletes",
   106          "maxWireVersion": 9,
   107          "type": "command",
   108          "response": {
   109            "ok": 0,
   110            "errmsg": "NotPrimaryOrSecondary",
   111            "code": 13436,
   112            "topologyVersion": {
   113              "processId": {
   114                "$oid": "000000000000000000000001"
   115              },
   116              "counter": {
   117                "$numberLong": "1"
   118              }
   119            }
   120          }
   121        }
   122      ],
   123      "outcome": {
   124        "servers": {
   125          "a:27017": {
   126            "type": "RSPrimary",
   127            "setName": "rs",
   128            "topologyVersion": {
   129              "processId": {
   130                "$oid": "000000000000000000000001"
   131              },
   132              "counter": {
   133                "$numberLong": "1"
   134              }
   135            },
   136            "pool": {
   137              "generation": 0
   138            }
   139          }
   140        },
   141        "topologyType": "ReplicaSetWithPrimary",
   142        "logicalSessionTimeoutMinutes": null,
   143        "setName": "rs"
   144      }
   145    }
   146  ]
   147}

View as plain text