Expand on resolutions to transaction is too large to complete; try splitting into pieces
error
#4409
Labels
no-issue-activity
O-external
Origin: Issue comes from external users.
P-2
Normal priority; secondary task
T-missing-info
Andy Woods (awoods187) commented:
Describe the problem
A customer recently received the error
transaction is too large to complete; try splitting into pieces
when attempting to use transactions to delete information.We only reference this error in Build a Python App (https://www.cockroachlabs.com/docs/v2.1/build-a-python-app-with-cockroachdb-sqlalchemy.html#break-up-large-transactions-into-smaller-units-of-work). In this case, the error wasn't resolved with the advice contained due to the specific customer steps.
For large deletes, the customer uses two transactions: first fetches session id's from select and it is passed in the delete in the 2nd.
We resolved this problem by adding FROM add
AS OF SYSTEM TIME '-1h'
in the Select ( https://www.cockroachlabs.com/docs/stable/as-of-system-time.html)This allows users to reduce contention since the deletes do not need to occur in realtime.
We should expand out our documentation on this error and this solution.
Also worth noting that Follower Reads is a superior solution to the AOST.
Jira Issue: DOC-246
The text was updated successfully, but these errors were encountered: