tikv / tikv/pd

`SetPlacementRules` fails without retrying when encountering transient network failure

Open
#9,462 1 comment 0 reactions 0 assignees View on GitHub
type/bug
Dominant language
Go
Stars
1.2k
Forks
783
Avg merge
5d 21h
Merged PRs (30d)
36

Description

## Bug Report

When handling `SetPlacementRules`, pd ran `DeleteRuleGroup` and `SaveRuleGroup` in transaction. However, when committing this transaction, RPC `Txn` encountered transient network failure. Then whole operation of `SetPlacementRules` failed without retrying.

### What did you do?

We set up the TiDB using Kubernetes and then executed the SQL below.

```sql
CREATE PLACEMENT POLICY rule1 FOLLOWERS=1;
CREATE TABLE t1 (
d date NOT NULL ,
name varchar(10) NOT NULL,
UNIQUE KEY (d,name)
) PLACEMENT POLICY="rule1";
```

### What did you expect to see?

These SQLs succeed under transient network failure, by `SetPlacementRules` retrying correctly.

### What did you see instead?

These SQLs failed.

```
ERROR 8243 (HY000): "rpc error: code = Unavailable desc = transient error"
```

### What version of PD are you using (`pd-server -V`)?

master branch

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.