mirror of
https://github.com/percona/percona-toolkit.git
synced 2026-03-01 02:00:46 +08:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user