Skip to content
Open
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re
- [#8378](https://github.com/thanos-io/thanos/pull/8378): Store: fix the reuse of dirty posting slices
- [#8558](https://github.com/thanos-io/thanos/pull/8558): Query-Frontend: Fix not logging requests when external-prefix is set in query
- [#8254](https://github.com/thanos-io/thanos/issues/8254) Receive: Endless loop of retried replication with capnproto and distributors
- [#8093](https://github.com/thanos-io/thanos/issues/8093) Receive: Fixed CapNProto server starting unconditionally. The server now only starts when `--receive.replication-protocol=capnproto` is explicitly set, preventing port conflicts and unnecessary resource usage when using the default Protobuf protocol.


### Added

Expand Down
6 changes: 5 additions & 1 deletion cmd/thanos/receive.go
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,9 @@ func runReceive(
}
}

{
// Only start CapNProto server when replication protocol is set to capnproto.
if receive.ReplicationProtocol(conf.replicationProtocol) == receive.CapNProtoReplication {
level.Info(logger).Log("msg", "starting Cap'n Proto server", "address", conf.replicationAddr)
capNProtoWriter := receive.NewCapNProtoWriter(logger, dbs, &receive.CapNProtoWriterOptions{
TooFarInFutureTimeWindow: int64(time.Duration(*conf.tsdbTooFarInFutureTimeWindow)),
})
Expand All @@ -537,6 +539,8 @@ func runReceive(
level.Warn(logger).Log("msg", "Cap'n Proto server did not shut down gracefully", "err", err.Error())
}
})
} else {
level.Info(logger).Log("msg", "Cap'n Proto server disabled", "reason", "replication protocol is not set to capnproto", "current_protocol", conf.replicationProtocol)
}

level.Info(logger).Log("msg", "starting receiver")
Expand Down
Loading