Skip to content

Commit

Permalink
fix: prevent queries from starting before initialization (minio#18756)
Browse files Browse the repository at this point in the history
Prevent queries from starting before initialization
  • Loading branch information
jiuker authored Jan 8, 2024
1 parent 2cd98a0 commit 53ceb07
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/metrics-v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -2021,6 +2021,11 @@ func getReplicationClusterMetrics() *MetricsGroup {

mg.RegisterRead(func(_ context.Context) []Metric {
var ml []Metric
objLayer := newObjectLayerFn()
// Service not initialized yet
if objLayer == nil {
return ml
}
// common operational metrics for bucket replication and site replication - published
// at cluster level
if globalReplicationStats != nil {
Expand Down

0 comments on commit 53ceb07

Please sign in to comment.