...

Text file src/go.mongodb.org/mongo-driver/testdata/server-discovery-and-monitoring/errors/stale-generation-afterHandshakeCompletes-network.json

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

     1{
     2  "description": "Stale generation network error afterHandshakeCompletes",
     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": "Non-stale application network error",
    56      "applicationErrors": [
    57        {
    58          "address": "a:27017",
    59          "when": "afterHandshakeCompletes",
    60          "maxWireVersion": 9,
    61          "type": "network"
    62        }
    63      ],
    64      "outcome": {
    65        "servers": {
    66          "a:27017": {
    67            "type": "Unknown",
    68            "topologyVersion": null,
    69            "pool": {
    70              "generation": 1
    71            }
    72          }
    73        },
    74        "topologyType": "ReplicaSetNoPrimary",
    75        "logicalSessionTimeoutMinutes": null,
    76        "setName": "rs"
    77      }
    78    },
    79    {
    80      "description": "Primary A is rediscovered",
    81      "responses": [
    82        [
    83          "a:27017",
    84          {
    85            "ok": 1,
    86            "helloOk": true,
    87            "isWritablePrimary": true,
    88            "hosts": [
    89              "a:27017"
    90            ],
    91            "setName": "rs",
    92            "minWireVersion": 0,
    93            "maxWireVersion": 9,
    94            "topologyVersion": {
    95              "processId": {
    96                "$oid": "000000000000000000000001"
    97              },
    98              "counter": {
    99                "$numberLong": "1"
   100              }
   101            }
   102          }
   103        ]
   104      ],
   105      "outcome": {
   106        "servers": {
   107          "a:27017": {
   108            "type": "RSPrimary",
   109            "setName": "rs",
   110            "topologyVersion": {
   111              "processId": {
   112                "$oid": "000000000000000000000001"
   113              },
   114              "counter": {
   115                "$numberLong": "1"
   116              }
   117            },
   118            "pool": {
   119              "generation": 1
   120            }
   121          }
   122        },
   123        "topologyType": "ReplicaSetWithPrimary",
   124        "logicalSessionTimeoutMinutes": null,
   125        "setName": "rs"
   126      }
   127    },
   128    {
   129      "description": "Ignore stale network error (stale generation)",
   130      "applicationErrors": [
   131        {
   132          "address": "a:27017",
   133          "generation": 0,
   134          "when": "afterHandshakeCompletes",
   135          "maxWireVersion": 9,
   136          "type": "network"
   137        }
   138      ],
   139      "outcome": {
   140        "servers": {
   141          "a:27017": {
   142            "type": "RSPrimary",
   143            "setName": "rs",
   144            "topologyVersion": {
   145              "processId": {
   146                "$oid": "000000000000000000000001"
   147              },
   148              "counter": {
   149                "$numberLong": "1"
   150              }
   151            },
   152            "pool": {
   153              "generation": 1
   154            }
   155          }
   156        },
   157        "topologyType": "ReplicaSetWithPrimary",
   158        "logicalSessionTimeoutMinutes": null,
   159        "setName": "rs"
   160      }
   161    }
   162  ]
   163}

View as plain text