Skip to content

Commit

Permalink
docs: fix receiver documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
cincinnat committed Sep 2, 2024
1 parent be97ef7 commit 918b063
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions docs/components/receive.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,16 +312,16 @@ Please see the metric `thanos_receive_forward_delay_seconds` to see if you need
The following formula is used for calculating quorum:

```go mdox-exec="sed -n '990,999p' pkg/receive/handler.go"
func (h *Handler) writeQuorum() int {
// NOTE(GiedriusS): this is here because otherwise RF=2 doesn't make sense as all writes
// would need to succeed all the time. Another way to think about it is when migrating
// from a Sidecar based setup with 2 Prometheus nodes to a Receiver setup, we want to
// keep the same guarantees.
if h.options.ReplicationFactor == 2 {
return 1
}
return int((h.options.ReplicationFactor / 2) + 1)
h.peers.markPeerUnavailable(endpointReplica.endpoint)
}
}
}
wg.Done()
})
}
// writeQuorum returns minimum number of replicas that has to confirm write success before claiming replication success.
func (h *Handler) writeQuorum() int {
```

So, if the replication factor is 2 then at least one write must succeed. With RF=3, two writes must succeed, and so on.
Expand Down

0 comments on commit 918b063

Please sign in to comment.