mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-02-09 15:27:11 +00:00
![]() Previously cluster with the following vmselect configuration: ./bin/vmselect -storageNode=gr1/:8211,gr1/:8212 -storageNode=gr2/:8213,gr2/:8214 -search.skipSlowReplicas=true -globalReplicationFactor=2 Here we have two vmstorage groups and -globalReplicationFactor=2, which effectively means that "every ingested sample is replicated across multiple vmstorage groups". Hence, gr1 and gr2 contain identical data set. And when we set -search.skipSlowReplicas=true it is expected vmselect should return result as soon as at least one storage group returned the full result. In current state, -search.skipSlowReplicas is ignored on the storage group level. It is only respected within the group (with -replicationFactor flag). This commit fixes global replication for skipSlowReplicas. To ensure that the fix works and does not break anything replication tests have been added. For checking the fix for skipping slow replicas see `testGroupSkipSlowReplicas()`. To emulate storage groups, the integration test creates a cluster with multilevel vminsert. The L1 inserts are group-level inserts, each writes to its own group of vmstorages. The L2 vminsert is a global vminsert that writes replicated to the L1 vminserts. To enable multilevel inserts changes in apptest framework and `lib/ingestserver/clusternative/server.go` were necessary. related issue: https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6924 --------- Signed-off-by: Artem Fetishev <rtm@victoriametrics.com> |
||
---|---|---|
.. | ||
server.go |