2.1.1 node crashes on large deletes

We have a table with a few million rows and a dozen columns. Issuing this delete, which refers to roughly half the rows in the table, crashes the node:

DELETE FROM accounts WHERE datasetversion = 4;

Limiting the deletes works, I tried up to 500k without issue.

DELETE FROM accounts WHERE datasetversion = 4 LIMIT 500000;

3 nodes x n1-standard-2 (2 cpu / 7.5gb) with local nvme SSD on GCE with 25% cache/mem settings, 3x RF, this is the only table in the database.

Posted on Github here: https://github.com/cockroachdb/cockroach/issues/32522

Hi @ManiGandham,

There was such a limitation back in v1.0, but this should no longer be the case in 1.1 and after. Would you mind opening an issue in our GitHub repo so our developers can investigate?


Thanks for the info @jesse

It’s still a problem, confirmed by the team, github issue linked in the first post: https://github.com/cockroachdb/cockroach/issues/32522

Looking further at the link you posted, it seems that’s about deleting all the data in the table, similar to truncate. We’re only deleting half of a large table.

Thanks, @ManiGandham. I’ll look into expanding our known limitations to cover this case more directly.

In the meantime you can delete the data by issuing the DELETE statement with a LIMIT clause (eg 10000 rows at a time) until the result count becomes 0 (no more data to delete).