citusdata / citusdata/citus

truncate after select may cause distributed deadlock in mx nodes

Open
#2,373 5 comments 0 reactions 0 assignees View on GitHub
bug mx
Dominant language
C
Stars
12.8k
Forks
794
Avg merge
2d 14h
Merged PRs (30d)
31

Description

Observed a distributed deadlock when testing a recent work on allowing truncate on MX nodes.

Verified that the deadlock does not occur on single node (not distributed) configuration.

- create 2 node cluster with both workers as mx nodes
- create a distributed table table_1

- connect to worker 2 (the one added to mx later) (connection 1)
- start a transaction
- issue select * from table_1

- connect to worker 1 (connection 2)
- start a transaction
- issue truncate table table_1 --> will block

- switch to connection 1
- issue truncate table table_1 --> will block

After a while our distribution deadlock detection kicks in an cancel one of the transactions.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.