Victoriametrics: or operator not working as expected on query_range

Created on 11 Jun 2020  路  4Comments  路  Source: VictoriaMetrics/VictoriaMetrics

Describe the bug
When I use or on a query_range (count(up == 0) or vector(0)), VM doesn't return the second value (right operand) if the first one is null (left operand), as Prometheus did. The second operand is only returned if all returned values of the first operand are null.

To Reproduce
It can be easily reproducible by using requests with "future" values (because it returns null values):

Expected behavior
I expect a response with second values if the first one is null.

Version
The same used on your playground:

  • vmselect-20200605-210748-heads-master-0-gf10124612
  • vmstorage-20200605-210906-heads-master-0-gf10124612
  • vminsert-20200605-210832-heads-master-0-gf10124612
bug

All 4 comments

@xunleii , thanks for the bug report!

The issue should be fixed in the following commits:

  • single-node version - 88e1b7d144e87c632765ce4c2f8f9abd7596efa8
  • cluster version - 6939e36fdda5d81f36301eb46730b3293415ad98

These commits will be included in the next release. In the mean time you can build VictoriaMetrics from the commits mentioned above according to these docs and verify whether the issue is fixed there

FYI, the bugfix has been included in VictoriaMetrics v1.37.1.

@valyala, thanks a lot for this fix. I close this issue because it already released.

Thanks for closing the issue! I forgot closing it after v1.37.1 release.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jelmd picture jelmd  路  3Comments

WilliamDahlen picture WilliamDahlen  路  3Comments

prdatur picture prdatur  路  3Comments

valyala picture valyala  路  4Comments

n4mine picture n4mine  路  3Comments