Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@
* [BUGFIX] Reduce failures to update heartbeat when using Consul. #3259
* [BUGFIX] When using ruler sharding, moving all user rule groups from ruler to a different one and then back could end up with some user groups not being evaluated at all. #3235
* [BUGFIX] Use a valid grpc header when logging IP addresses. #3307
* [BUGFIX] Fixes the metric `cortex_prometheus_rule_group_duration_seconds` in the Ruler, it wouldn't report any values. #3310
* [BUGFIX] Fixed the metric `cortex_prometheus_rule_group_duration_seconds` in the Ruler, it wouldn't report any values. #3310
* [BUGFIX] Fixed gRPC connections leaking in rulers when rulers sharding is enabled and APIs called. #3314

## 1.4.0 / 2020-10-02

Expand Down
6 changes: 6 additions & 0 deletions pkg/ruler/ruler.go
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,12 @@ func (r *Ruler) getShardedRules(ctx context.Context) ([]*GroupStateDesc, error)
}
cc := NewRulerClient(conn)
newGrps, err := cc.Rules(ctx, nil)

// Close the gRPC connection regardless the RPC was successful or not.
if closeErr := conn.Close(); closeErr != nil {
level.Warn(r.logger).Log("msg", "failed to close gRPC connection to ruler", "remote", rlr.Addr, "err", closeErr)
}

if err != nil {
return nil, fmt.Errorf("unable to retrieve rules from other rulers, %v", err)
}
Expand Down