Skip to content

PromQL query_range returns 500 for min/max/avg/sum by (...) (time() - metric) #8397

Description

@tangyouzzz

What type of bug is this?

Unexpected error

What subsystems are affected?

Frontend

Minimal reproduce step

upgrading from v1.0.0-rc.2 to v1.1.1.

min( time() -
  container_start_time_seconds{}
) by (namespace, project,app)

What did you expect to see?

The query should return a valid Prometheus matrix result instead of HTTP 500.

What did you see instead?

unexpected response with status code 500: {"status":"error","error":"Internal error: 1003","errorType":"Internal"}

This also fails with max, avg, and sum.

However:

  • removing time() makes the query work
  • removing the aggregation makes the query work

What operating system did you use?

linux

What version of GreptimeDB did you use?

v1.1.1

Relevant log output and stack trace

Metadata

Metadata

Assignees

Labels

C-bugCategory Bugs

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions