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

Expand on resolutions to transaction is too large to complete; try splitting into pieces error #4409

Open
awoods187 opened this issue Feb 22, 2019 · 3 comments
Assignees
Labels
no-issue-activity O-external Origin: Issue comes from external users. P-2 Normal priority; secondary task T-missing-info

Comments

@awoods187
Copy link
Contributor

awoods187 commented Feb 22, 2019

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

@jseldess
Copy link
Contributor

Thanks, @awoods187! Sounds like we need to at least both expand the sql alchemy guidance and add this error to https://www.cockroachlabs.com/docs/stable/common-errors.html.

@jseldess jseldess added O-external Origin: Issue comes from external users. T-missing-info A-sql P-2 Normal priority; secondary task labels Feb 24, 2019
@ericharmeling
Copy link
Contributor

FWIW, we've improved our DELETE docs to cover large deletes with an AOST query: https://www.cockroachlabs.com/docs/stable/delete.html#batch-delete-on-a-non-indexed-column.

@github-actions
Copy link

We have marked this issue as stale because it has been inactive for
18 months. If this issue is still relevant, removing the stale label
or adding a comment will keep it active. Otherwise, we'll close it in
10 days to keep the issue queue tidy. Thank you for your contribution
to CockroachDB docs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-issue-activity O-external Origin: Issue comes from external users. P-2 Normal priority; secondary task T-missing-info
Projects
None yet
Development

No branches or pull requests

4 participants