mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-13 14:39:28 +00:00
Fixed isProfilerEnabled func
This commit is contained in:
@@ -489,7 +489,7 @@ func isProfilerEnabled(dialer pmgo.Dialer, di *pmgo.DialInfo) (bool, error) {
|
|||||||
|
|
||||||
isReplicaEnabled := isReplicasetEnabled(session)
|
isReplicaEnabled := isReplicasetEnabled(session)
|
||||||
|
|
||||||
if member.StateStr == "configsvr" {
|
if strings.ToLower(member.StateStr) == "configsvr" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -499,6 +499,7 @@ func isProfilerEnabled(dialer pmgo.Dialer, di *pmgo.DialInfo) (bool, error) {
|
|||||||
if err := session.DB(di.Database).Run(bson.M{"profile": -1}, &ps); err != nil {
|
if err := session.DB(di.Database).Run(bson.M{"profile": -1}, &ps); err != nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if ps.Was == 0 {
|
if ps.Was == 0 {
|
||||||
return false, nil
|
return false, nil
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user