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

Chart cache timeout is ignored #21635

Closed
3 tasks
mayurnewase opened this issue Sep 29, 2022 · 2 comments · Fixed by #21637
Closed
3 tasks

Chart cache timeout is ignored #21635

mayurnewase opened this issue Sep 29, 2022 · 2 comments · Fixed by #21637
Assignees
Labels
#bug Bug report infra:caching Infra setup and configuration related to caching

Comments

@mayurnewase
Copy link
Contributor

mayurnewase commented Sep 29, 2022

Chart cache timeout is ignored, I only tested with dataset cache timeout set but looking at the code I think it will be ignored irrespetive of dataset cache timeout config.

How to reproduce the bug

  1. start redis locally, and setup redis cache in config for data
  2. create any chart on 1 dataset
  3. set dataset cache timeout to 120 seconds
  4. set chart cache timeout to 5 seconds (from properties modal).
  5. open chart, and click on update chart
  6. use redis cli, to check the expiry set on the cache key using ttl {cache_key} -> it will be 120 seconds.
  7. after a minute backend still gives cached data, and we see cached a minute ago tag on top right corner.

Expected results

Chart cache timout should override dataset timeout setting, and return actual data from database after 5 seconds.

Actual results

Chart cache timout setting is ignored, and dataset cache timeout is used for checking existing cached data..

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

(please complete the following information):

  • browser type and version: chrome
  • superset version: latest master (last commit sha: 71bf2673071d5db6688fbaefd4457aeeae3464bb)
  • python version: python --version: 3.9
  • node.js version: node -v: 16
  • any feature flags active: No

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context

Add any other context about the problem here.

@mayurnewase mayurnewase added #bug Bug report infra:caching Infra setup and configuration related to caching labels Sep 29, 2022
@mayurnewase mayurnewase self-assigned this Sep 29, 2022
@villebro
Copy link
Member

@mayurnewase Oh interesting. Apparently buildQuery isn't passing along the custom cache timouts from form data to the chart data request. I believe this needs to be fixed in @superset-ui/core. I can take a look, hoping it will be a simple fix.

@mayurnewase
Copy link
Contributor Author

ouch, so custom_cache_timeout was supposed to be used even by the frontend?
I thougth it was for overriding all other timeouts while using that api in other automations.
I already added 1 pr: #21637
will close it.
@villebro

@mayurnewase mayurnewase changed the title Chart cache timeout is ignored when dataset cache is set Chart cache timeout is ignored Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report infra:caching Infra setup and configuration related to caching
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants