Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client return "PD returned no region" without additional information #860

Closed
lcwangchao opened this issue Jun 30, 2023 · 0 comments · Fixed by #862
Closed

client return "PD returned no region" without additional information #860

lcwangchao opened this issue Jun 30, 2023 · 0 comments · Fixed by #862

Comments

@lcwangchao
Copy link
Contributor

When execute SHOW PLACEMENT it returns an error with some log:

 [sql=\"show table geopartition.tx regions\"] [txn_mode=PESSIMISTIC] [timestamp=0] [err=\"PD returned no region\\ngithub.com/tikv/client-go/v2/internal/locate.(*RegionCache).scanRegions\\n\\t/go/pkg/mod/github.com/tikv/client-go/v2@v2.0.8-0.20230621031026-864a5fc0c482/internal/locate/region_cache.go:1722\\ngithub.com/tikv/client-go/v2/internal/locate.(*RegionCache).BatchLoadRegionsWithKeyRange\\n\\t/go/pkg/mod/github.com/tikv/client-go/v2@v2.0.8-0.20230621031026-864a5fc0c482/internal/locate/region_cache.go:1298\\ngithub.com/tikv/client-go/v2/internal/locate.(*RegionCache).LoadRegionsInKeyRange\\n\\t/go/pkg/mod/github.com/tikv/client-go/v2@v2.0.8-0.20230621031026-864a5fc0c482/internal/locate/region_cache.go:1277\\ngithub.com/pingcap/tidb/executor.getPhysicalTableRegions\\n\\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/split.go:642\\ngithub.com/pingcap/tidb/executor.getTableRegions\\n\\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/show.go:2115\\ngithub.com/pingcap/tidb/executor.(*ShowExec).fetchShowTableRegions\\n\\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/show.go:2043\\ngithub.com/pingcap/tidb/executor.(*ShowExec).fetchAll\\n\\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/show.go:265\\ngithub.com/pingcap/tidb/executor.(*ShowExec).Next\\n\\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/show.go:128\\ngithub.com/pingcap/tidb/executor.Next\\n\\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/executor.go:342\\ngithub.com/pingcap/tidb/executor.(*ExecStmt).next\\n\\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/adapter.go:1218\\ngithub.com/pingcap/tidb/executor.(*recordSet).Next\\n\\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/adapter.go:151\\ngithub.com/pingcap/tidb/server.(*tidbResultSet).Next\\n\\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/driver_tidb.go:429\\ngithub.com/pingcap/tidb/server.(*clientConn).writeChunks\\n\\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:2335\\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultSet\\n\\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:2278\\ngithub.com/pingcap/tidb/server.(*clientConn).handleStmt\\n\\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:2151\\ngithub.com/pingcap/tidb/server.(*clientConn).handleQuery\\n\\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1912\\ngithub.com/pingcap/tidb/server.(*clientConn).dispatch\\n\\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1399\\ngithub.com/pingcap/tidb/server.(*clientConn).Run\\n\\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1178\\ngithub.com/pingcap/tidb/server.(*Server).onConn\\n\\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/server.go:663\\nruntime.goexit\\n\\t/usr/local/go/src/runtime/asm_amd64.s:1598\\ngithub.com/pingcap/errors.AddStack\\n\\t/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20221009092201-b66cddb77c32/errors.go:174\\ngithub.com/pingcap/errors.Trace\\n\\t/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20221009092201-b66cddb77c32/juju_adaptor.go:15\\ngithub.com/pingcap/tidb/executor.(*ShowExec).Next\\n\\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/show.go:130\\ngithub.com/pingcap/tidb/executor.Next\\n\\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/executor.go:342\\ngithub.com/pingcap/tidb/executor.(*ExecStmt).next\\n\\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/adapter.go:1218\\ngithub.com/pingcap/tidb/executor.(*recordSet).Next\\n\\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/adapter.go:151\\ngithub.com/pingcap/tidb/server.(*tidbResultSet).Next\\n\\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/driver_tidb.go:429\\ngithub.com/pingcap/tidb/server.(*clientConn).writeChunks\\n\\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:2335\\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultSet\\n\\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:2278\\ngithub.com/pingcap/tidb/server.(*clientConn).handleStmt\\n\\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:2151\\ngithub.com/pingcap/tidb/server.(*clientConn).handleQuery\\n\\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1912\\ngithub.com/pingcap/tidb/server.(*clientConn).dispatch\\n\\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1399\\ngithub.com/pingcap/tidb/server.(*clientConn).Run\\n\\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1178\\ngithub.com/pingcap/tidb/server.(*Server).onConn\\n\\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/server.go:663\\nruntime.goexit\\n\\t/usr/local/go/src/runtime/asm_amd64.s:1598\"]"}

However, it cannot be reproduced. I think we should add more information when "PD returned no region" happens to help us to find the real reason in log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant