Skip to content

Commit

Permalink
chore: bump the timeout to validate deletes have executed
Browse files Browse the repository at this point in the history
  • Loading branch information
fuziontech committed Aug 5, 2024
1 parent 0fe42a4 commit 72d430a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion posthog/models/async_deletion/delete_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# We purposely set this lower than the 256KB limit in ClickHouse to account for the potential overhead of the argument
# substitution and settings injection. This is a conservative estimate, but it's better to be safe than hit the limit.
MAX_QUERY_SIZE = 230_000 # 230KB which is less than 256KB limit in ClickHouse
MAX_SELECT_EXECUTION_TIME = 2 * 60 * 60 # 2 hours


# Note: Session recording, dead letter queue, logs deletion will be handled by TTL
TABLES_TO_DELETE_TEAM_DATA_FROM = [
Expand Down Expand Up @@ -127,7 +129,7 @@ def _verify_by_column(self, distinct_columns: str, async_deletions: list[AsyncDe
WHERE {" OR ".join(conditions)}
""",
args,
settings={"max_execution_time": 30 * 60},
settings={"max_execution_time": MAX_SELECT_EXECUTION_TIME},
)
return {tuple(row) for row in clickhouse_result}

Expand Down

0 comments on commit 72d430a

Please sign in to comment.