# [Known-Issues]TiKV Store 下线之后，TiDB 日志一直报错 invalid store ID

## Key Words

invalid store ID

## Description

The tidb.log reports some "invalid store ID" error logs after offline tikv-server.

```golang
[2021/05/07 13:36:58.659 +08:00] [ERROR] [region_cache.go:1780] ["loadStore from PD failed"] [id=9] [error="rpc error: code = Unknown desc = invalid store ID 9, not found"]
[2021/05/07 13:36:58.663 +08:00] [ERROR] [terror.go:291] ["encountered error"] [error="rpc error: code = Unknown desc = invalid store ID 9, not found"] [stack="github.com/pingcap/parser/terror.Log\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/pkg/mod/github.com/pingcap/parser@v0.0.0-20210325072920-0d17053a8a69/terror/terror.go:291\ngithub.com/pingcap/tidb/store/tikv.(*RegionCache).asyncCheckAndResolveLoop\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/store/tikv/region_cache.go:339"]
```

## Root Cause

When the Store is offline and the tombstone information is deleted from the PD, then TiDB uses PD client's GetStore(already deleted) will get error: invalid store ID xx, not found.

More info refer to: <https://github.com/pingcap/tidb/issues/23676>

## Diagnostic Steps

1. tidb.log reports some "invalid store ID" error logs:invalid store ID xx,not found.

2. Use the pd-ctl region command to make sure the store which had been offline is empty.

```shell
pd-ctl region --jq=".regions[] | {id: .id, peer_stores: [.peers[].store_id] | select(any(.==xxx))}"
```

## Resolution

Upgrade to unaffected version

## Workaround

N/A

## Affected Versions

v4.0.0 ~ v4.0.14

v5.0.0 ~ v5.0.2
