PMM-7116 incorrect startup state (#519)

* Updated changelog for (WIP) 3.3.2

* Updated changelog

* PT-7116 Updated MyState results

* PT-7116 Updated MyState results

* PT-7116 Updated MyState results

* PMM-7116 Return the error in MyState

Don't manage the error, just bubble it up.
The client must know there was an error, even when the error is no
'real' like in Mongos instances (there is no error because there is no
replicaset for mongos or standalone)
This commit is contained in:
Carlos Salguero
2021-11-08 10:59:54 -03:00
committed by GitHub
parent c5a22407a7
commit 16716b3a7b
2 changed files with 33 additions and 14 deletions

View File

@@ -480,9 +480,6 @@ func MyState(ctx context.Context, client *mongo.Client) (int, error) {
var ms proto.MyState
err := client.Database("admin").RunCommand(ctx, bson.M{"getDiagnosticData": 1}).Decode(&ms)
if _, ok := err.(topology.ServerSelectionError); ok {
return 0, nil
}
if err != nil {
return 0, err
}