File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
Release 0.20.6 (unreleased)
2
2
3
+ Fixed bug PMM-8489: Failed to get topology labels when the target server is mongos
3
4
Improvement \#283 : Add storage stats to collection metrics (Thanks Masaru Hoshi @qlik-trial)
4
5
5
6
Original file line number Diff line number Diff line change @@ -115,11 +115,11 @@ func (t *topologyInfo) loadLabels(ctx context.Context) error {
115
115
}
116
116
t .labels [labelClusterID ] = cid
117
117
118
+ // Standalone instances or mongos instances won't have a replicaset state
118
119
state , err := util .MyState (ctx , t .client )
119
- if err ! = nil {
120
- return errors . Wrapf ( ErrCannotGetTopologyLabels , "error getting replicaset state: %s " , err )
120
+ if err = = nil {
121
+ t . labels [ labelReplicasetState ] = fmt . Sprintf ( "%d " , state )
121
122
}
122
- t .labels [labelReplicasetState ] = fmt .Sprintf ("%d" , state )
123
123
124
124
return nil
125
125
}
You can’t perform that action at this time.
0 commit comments