citusdata / citusdata/citus

Retry SELECT after placement metadata change

Open
#2,536 1 comment 0 reactions 0 assignees View on GitHub
high availability
Dominant language
C
Stars
12.8k
Forks
794
Avg merge
2d 14h
Merged PRs (30d)
31

Description

SELECT commands may error out during operations such as a rebalance and `master_update_node` because they do not take any shard metadata locks. Taking locks is mostly undesirable because it might cause a long-runnning SELECT to block a failover. An alternative is to retry the SELECT with fresh placement metadata.

We already have the necessary logic to retry SELECTs. We mainly need to reload the placement metadata and retry with the new placement metadata if it changed.

Potentially, we could avoid SELECTs from erroring out completely during rebalance and switchover.

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.