8000 Using the same chart multiple times in a dashboard can throw error about missing columns · Issue #14728 · lightdash/lightdash · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Using the same chart multiple times in a dashboard can throw error about missing columns #14728

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

Open
almeidabbm opened this issue May 8, 2025 · 2 comments · May be fixed by #15059
Open

Using the same chart multiple times in a dashboard can throw error about missing columns #14728

almeidabbm opened this issue May 8, 2025 · 2 comments · May be fixed by #15059
Assignees
Labels
🐛 bug Something isn't working as expected. This can be an error or an unexpected user experience tech-debt Cruft, refactoring, and hinderances to developer productivity

Comments

@almeidabbm
Copy link
Contributor
almeidabbm commented May 8, 2025

There is a race condition when loading the same chart multiple times in the same dashboard.

They both upsert the row in the cache table because cache_key is unique so the 2 charts can't load the results independently.

@ZeRego
Copy link
Collaborator
ZeRego commented May 12, 2025

Also take into account this slack thread: https://lightdash.slack.com/archives/C08N5JUL57V/p1746799759056689

A way to keep simple code flow with no "cache/results files" updates and different state management:

  • Delete cache table, all info is in query_history
  • query history columns: query_hash (non unique, indexed), file_name (string, non unique)

Scenario:

  • cache: find query by query_hash + state=ready + not expired (calculate with created_at + stale time) -> applies the same file name to new query_history row
  • scenario where state != ready: 2 queries with the same hash are triggered at the same time -> 2 query history + 2 files (no cache used)

@almeidabbm almeidabbm moved this from 📝 To-Do to 🏗 In progress in Selected for Development May 13, 2025
@almeidabbm almeidabbm self-assigned this May 13, 2025
@almeidabbm almeidabbm moved this from 🏗 In progress to 📝 To-Do in Selected for Development May 13, 2025
@almeidabbm almeidabbm removed their assignment May 13, 2025
@ZeRego ZeRego changed the title Rename results_cache and ResultsCacheModel Using the same chart multiple times in a dashboard can throw error about missing columns May 28, 2025
@ZeRego ZeRego added 🐛 bug Something isn't working as expected. This can be an error or an unexpected user experience tech-debt Cruft, refactoring, and hinderances to developer productivity labels May 28, 2025
@ZeRego ZeRego moved this from 📝 To-Do to 🏗 In progress in Selected for Development May 28, 2025
@almeidabbm
Copy link
Contributor Author

Duplicate of customer issue: #15031
Fix here will be an actual restructure into results file records in the database: #14728 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working as expected. This can be an error or an unexpected user experience tech-debt Cruft, refactoring, and hinderances to developer productivity
Projects
Status: 🏗 In progress
Development

Successfully merging a pull request may close this issue.

2 participants
0