Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vmui sends 3 requests to tsdb instead of 2 #6240

Open
rtm0 opened this issue May 8, 2024 · 2 comments
Open

vmui sends 3 requests to tsdb instead of 2 #6240

rtm0 opened this issue May 8, 2024 · 2 comments
Assignees
Labels
bug Something isn't working vmui

Comments

@rtm0
Copy link

rtm0 commented May 8, 2024

Describe the bug

After I pick a day using a calendar widget, vmui sends 3 requests to tsdb. For example, if I pick 2024-05-07, the following requests are sent:

GET /prometheus/api/v1/status/tsdb?topN=10&date=2024-05-07
GET /prometheus/api/v1/status/tsdb?topN=10&date=2024-05-05
GET /prometheus/api/v1/status/tsdb?topN=0&date=2024-05-07

Per discusstion with @valyala, only the first two should be sent.

Additionally, the date in the second request is two days before the chosen date. Not sure if this is a bug, but it feels like it should be just one day before? I.e. in the example above, it should be 2024-05-06 instead fo 2024-05-05.

To Reproduce

  1. Navigate to Explore > Explore Cardinality and open the browser's developer console and choose Network tab
  2. Click on the date in the right upper corner of the vmui and pick a day
  3. Confirm vmui send 3 requests: vmui-3-requests

Version

v1.100.1 built locally with make victoria-metrics

Logs

No response

Screenshots

No response

Used command-line flags

No response

Additional information

No response

@rtm0 rtm0 added the bug Something isn't working label May 8, 2024
@Loori-R Loori-R added the vmui label May 8, 2024
@Loori-R
Copy link
Contributor

Loori-R commented May 8, 2024

Thank you for describing the problem.
The third request is needed to obtain totals when using the "Time series selector" filter; if it is empty, then the request is redundant.
The date should be set to one day back, it seems to be related to #6239

@hagen1778
Copy link
Collaborator

Related ticket #5231

hagen1778 pushed a commit that referenced this issue May 17, 2024
)

Remove redundant requests on the Explore Cardinality page.

#6240
hagen1778 pushed a commit that referenced this issue May 17, 2024
)

Remove redundant requests on the Explore Cardinality page.

#6240
(cherry picked from commit be291c3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working vmui
Projects
None yet
Development

No branches or pull requests

3 participants