victorialogs: add cluster mode

Cluster mode is enabled when -storageNode command-line flag is passed to VictoriaLogs.
In this mode it spreads the ingested logs among storage nodes specified in the -storageNode flag.
It also queries storage nodes during `select` queries.

Cluster mode allows building multi-level cluster setup when top-level select node can query multiple lower-level clusters
and get global querying view.

See https://docs.victoriametrics.com/victorialogs/cluster/

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5077
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7950
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/8223
This commit is contained in:
Aliaksandr Valialkin
2025-04-10 14:10:39 +02:00
parent ff967a8e65
commit 7a46af3920
134 changed files with 7179 additions and 1238 deletions

View File

@@ -646,7 +646,7 @@ func (rwa *responseWriterWithAbort) abort() {
logger.Panicf("BUG: abort can be called only after http response headers are sent")
}
if rwa.aborted {
logger.WarnfSkipframes(2, "cannot abort the connection, since it has been already aborted")
// Nothing to do. The connection has been already aborted.
return
}
hj, ok := rwa.ResponseWriter.(http.Hijacker)