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

fix: cached query_settings #73

Merged
merged 1 commit into from
Jul 8, 2024
Merged

fix: cached query_settings #73

merged 1 commit into from
Jul 8, 2024

Conversation

Daesgar
Copy link
Contributor

@Daesgar Daesgar commented Jul 8, 2024

For some reason (I lack knowledge of celery / Django, there must be an explanation for this), the query_settings were being cached.

This meant that, when a base backup was executed after an incremental backup, the base backup was taking the last query_settings used, so when the base backup was performed it was using the previous base backup cached in the query settings from the last execution. It could even be a base backup for a different table.

The base backup should never use a previous base backup.

This fixes the issue, but I'll keep monitoring it for the next following backups performed.

image

Copy link

sentry-io bot commented Jul 8, 2024

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: housewatch/clickhouse/backups.py

Function Unhandled Issue
execute_backup UnboundLocalError: local variable 'final_query' referenced before assignment ...
Event Count: 2
execute_backup TypeError: str.join() takes no keyword arguments ...
Event Count: 2

Did you find this useful? React with a 👍 or 👎

@Daesgar Daesgar requested a review from fuziontech July 8, 2024 10:55
@Daesgar Daesgar marked this pull request as ready for review July 8, 2024 10:55
@Daesgar
Copy link
Contributor Author

Daesgar commented Jul 8, 2024

@fuziontech I'm merging this, it's a very small change. Anyway, if you review it and see any problems let me know!

@Daesgar Daesgar merged commit 93a182a into main Jul 8, 2024
2 checks passed
@Daesgar Daesgar deleted the fix-cached-query-settings branch July 8, 2024 11:30
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.

1 participant