-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
sql-stats-compaction: failing with TransactionRetryError #108936
Comments
108947: sql: fix sql compaction job full scan r=j82w a=j82w The sql-stats-compaction is failing with TransactionRetryError. This is caused by the internal executor uses the zero-values for the settings, rather than the cluster defaults. This causes `SET reorder_joins_limit = 0;` which then causes the `sql-stats-compaction` delete statement to do a full scan. The full scan is causing the query to take a long time causing other queries to conflict with it. Error: `TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SERIALIZABLE - failed preemptive refresh due to a conflict: committed value on key` The fix to use the correct default value instead of 0 is made in #101486. Solution is to change the query to avoid the join and thus the full scan. Fixes: #108936 Release note (sql change): Optimized the sql-stats-compaction job delete query to avoid full scan. This helps avoid the TransactionRetryError which can cause the job to fail. Co-authored-by: j82w <[email protected]>
Which default value specifically causes him to perform a full scan? gentlemen |
Description:
The
sql-stats-compaction
is failing withTransactionRetryError
. This is caused by the internal executor uses the zero-values for the settings, rather than the cluster defaults. This causesSET reorder_joins_limit = 0;
which then causes thesql-stats-compaction
delete statement to do a full scan. The full scan is causing the query to take a long time causing other queries to conflict with it.Error:
TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SERIALIZABLE - failed preemptive refresh due to a conflict: committed value on key
Got the bundle:
The fix to use the correct default value instead of 0 is made in #101486. That is not being backported.
Solution is to change the query to avoid the join and thus the full scan:
Jira issue: CRDB-30707
The text was updated successfully, but these errors were encountered: