MCPcopy Create free account
hub / github.com/cortexproject/cortex / Merge

Method Merge

pkg/ring/model.go:219–221  ·  view source on GitHub ↗

Merge merges other ring into this one. Returns sub-ring that represents the change, and can be sent out to other clients. This merge function depends on the timestamp of the ingester. For each ingester, it will choose more recent state from the two rings, and put that into this ring. There is one e

(mergeable memberlist.Mergeable, localCAS bool)

Source from the content-addressed store, hash-verified

217//
218// Note: This method modifies d and mergeable to reduce allocations and copies.
219func (d *Desc) Merge(mergeable memberlist.Mergeable, localCAS bool) (memberlist.Mergeable, error) {
220 return d.mergeWithTime(mergeable, localCAS, time.Now())
221}
222
223func (d *Desc) mergeWithTime(mergeable memberlist.Mergeable, localCAS bool, now time.Time) (memberlist.Mergeable, error) {
224 if mergeable == nil {

Calls 1

mergeWithTimeMethod · 0.95

Tested by 1