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

Reduce aggregate user full refresh frequency #2061

Merged
merged 2 commits into from
Nov 11, 2021
Merged

Conversation

isaacsolo
Copy link
Contributor

Description

The full refreshes that happen once every ~100 updates for aggregate_user seems to block other queries. For now, we can reduce the frequency to prevent this. Next we'll separate the truncate from the update transaction and do a drop/replace.

Tests

How will this change be monitored?

@@ -10,7 +10,10 @@
# Names of the aggregate tables to update
AGGREGATE_USER = "aggregate_user"
DEFAULT_UPDATE_TIMEOUT = 60 * 30 # 30 minutes
REFRESH_COUNTER = 100

# every ~10000 updates, refresh the entire table
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this every 10000 updates or every 1000 updates? REFRESH_COUNTER seems to be 1000. Also where is the 30s interval? (Just trying to get context.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops fixed my comment typo. the interval is here

"schedule": timedelta(seconds=30),
.

@isaacsolo isaacsolo merged commit 1f78007 into master Nov 11, 2021
@isaacsolo isaacsolo deleted the is-agg-user-refresh branch November 11, 2021 21:59
dmanjunath pushed a commit that referenced this pull request Nov 11, 2021
* Reduce aggregate user full refreshes

* fix comment typo
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.

None yet

3 participants