Skip to content

DELETE FROM ... [returning nothing] crashes a node #17921

@AnyCPU

Description

@AnyCPU

A cluster has 3 nodes running on Cockroachdb 1.0.5 (Linux, 64bit)
A db has about 195 millions of records.
Scheme is

CREATE TABLE stats (
	numa STRING(32) NULL,
	bytes INT NULL,
	amount DECIMAL NULL,
	ts TIMESTAMP NULL,
	da INT NULL,
	INDEX idx_stats_ts (ts ASC) STORING (numa, bytes, amount, da),
	FAMILY "primary" (numa, bytes, amount, ts, da, rowid)
)

The db has data of an one month.
I want to delete data starting from second day of month, so
I run either delete from stats where ts > '2017-01-01 23:59:59'::timestamp; or delete from stats where ts > '2017-01-01 23:59:59'::timestamp returning nothing;.
I use the cockroach sql --insecure --host = ... command to run my query.
After some minutes an used node dies.
A db driver returns - bad connection.
And there are a lot of messages like that context canceled while in command queue: ResolveIntent... in the log.

All nodes have free space.

Do I have to delete data by chunks?

Thanks.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions