diff --git a/docs/changelog/CHANGELOG.md b/docs/changelog/CHANGELOG.md index 8442b4419..cf2ddd012 100644 --- a/docs/changelog/CHANGELOG.md +++ b/docs/changelog/CHANGELOG.md @@ -28,6 +28,7 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/). * BUGFIX: [vmgateway](https://docs.victoriametrics.com/vmgateway/): fix possible panic during parsing of a token without `vm_access` claim. This issue was introduced in v1.104.0. * BUGFIX: [vmui](https://docs.victoriametrics.com/#vmui): fix error messages rendering from overflowing the screen with long messages. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7207). +* BUGFIX: `vmselect` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/): properly process response in [multi-level cluster setup](https://docs.victoriametrics.com/cluster-victoriametrics/#multi-level-cluster-setup). Before, vmselect could return no data in multi-level setup. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7270) for details. The issue was introduced in [v1.104.0](https://docs.victoriametrics.com/changelog/#v11040). ## [v1.104.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.104.0) diff --git a/lib/storage/search.go b/lib/storage/search.go index 1e8de9976..b24940ad4 100644 --- a/lib/storage/search.go +++ b/lib/storage/search.go @@ -277,6 +277,11 @@ type SearchQuery struct { AccountID uint32 ProjectID uint32 + // TenantTokens and IsMultiTenant is artificial fields + // they're only exist at runtime and cannot be transferred + // via network calls for keeping communication protocol compatibility + // TODO:@f41gh7 introduce breaking change to the protocol later + // and use TenantTokens instead of AccountID and ProjectID TenantTokens []TenantToken IsMultiTenant bool @@ -505,6 +510,7 @@ func (sq *SearchQuery) Unmarshal(src []byte) ([]byte, error) { sq.ProjectID = encoding.UnmarshalUint32(src) src = src[4:] + sq.TenantTokens = []TenantToken{{AccountID: sq.AccountID, ProjectID: sq.ProjectID}} minTs, nSize := encoding.UnmarshalVarInt64(src) if nSize <= 0 { return src, fmt.Errorf("cannot unmarshal MinTimestamp from varint")