8000 fix: race condition for results_cache entry pending while query history ready by almeidabbm · Pull Request #15034 · lightdash/lightdash · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: race condition for results_cache entry pending while query history ready #15034

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

Conversation

almeidabbm
Copy link
Contributor
@almeidabbm almeidabbm commented May 28, 2025

Closes: #15031
Relates to: #14728

  • Fixes race condition by overriding the query_history status when getting results page if the results_cache row is PENDING

Before
image

After
Log
image
Dashboards
image

Steps to reproduce

  1. Use a warehouse that is not local - longer execution times help reproducing this race condition
  2. Use a chart that has more than 500 results - more pages help reproducing this race condition - I used events, with event_id and limit of 5000
  3. Create dashboard and duplicate the tile a couple times - duplicating instead of adding the same chart will lead to more requests of the same results
  4. Open the dashboard twice in separate browser windows at the same time - found it was easier to work with windows rather than tabs because of how chrome fires the requests

test-frontend

@owlas owlas deployed to 05-28-fix_race_condition_for_results_cache_entry_pending_while_query_history_ready - jaffle_db_pg_13 PR #15034 May 28, 2025 09:48 — with Render Active
@owlas owlas deployed to 05-28-fix_race_condition_for_results_cache_entry_pending_while_query_history_ready - headless-browser PR #15034 May 28, 2025 09:48 — with Render Active
@almeidabbm almeidabbm marked this pull request as ready for review May 28, 2025 09:48
Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@owlas owlas temporarily deployed to 05-28-fix_race_condition_for_results_cache_entry_pending_while_query_history_ready - lightdash PR #15034 May 28, 2025 10:17 — with Render Destroyed
@owlas owlas temporarily deployed to 05-28-fix_race_condition_for_results_cache_entry_pending_while_query_history_ready - headless-browser PR #15034 May 28, 2025 10:17 — with Render Destroyed
@almeidabbm almeidabbm merged commit 760b220 into main May 28, 2025
49 of 52 checks passed
@almeidabbm almeidabbm deleted the 05-28-fix_race_condition_for_results_cache_entry_pending_while_query_history_ready branch May 28, 2025 11:17
lightdash-bot pushed a commit that referenced this pull request May 28, 2025
## [0.1659.1](0.1659.0...0.1659.1) (2025-05-28)

### Bug Fixes

* race condition for results_cache entry pending while query history ready ([#15034](#15034)) ([760b220](760b220))
@lightdash-bot
Copy link
Collaborator

🎉 This PR is included in version 0.1659.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dashboard charts failing with "Columns not found"
4 participants
0