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

Avoid updating query result for archived queries #6488

Merged
merged 1 commit into from
Sep 29, 2023

Conversation

eradman
Copy link
Collaborator

@eradman eradman commented Sep 28, 2023

What type of PR is this?

  • Bug Fix
  • Optimization

Description

Refreshing an active query inadvertently updates archived queries with the same query_hash. On installations with many archived queries this increases the load on the database and consumes space that may never be reclaimed.

How is this tested?

  • Unit tests (pytest, jest)

@codecov
Copy link

codecov bot commented Sep 28, 2023

Codecov Report

Merging #6488 (aa6650a) into master (4a36abc) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #6488   +/-   ##
=======================================
  Coverage   61.08%   61.08%           
=======================================
  Files         158      158           
  Lines       12878    12878           
  Branches     1753     1753           
=======================================
  Hits         7866     7866           
  Misses       4766     4766           
  Partials      246      246           
Files Coverage Δ
redash/models/__init__.py 92.25% <ø> (ø)

@justinclift
Copy link
Member

Good catch @eradman. 😄

@justinclift justinclift merged commit 3d32c55 into getredash:master Sep 29, 2023
13 checks passed
@eradman eradman deleted the query-result branch September 29, 2023 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants