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

"Can't find a proper physical plan for this query" for TiFlash after running TiFlash tests #46645

Closed
mjonss opened this issue Sep 4, 2023 · 1 comment
Labels
component/tiflash feature/developing the related feature is in development may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 severity/major sig/execution SIG execution type/bug The issue is confirmed as a bug.

Comments

@mjonss
Copy link
Contributor

mjonss commented Sep 4, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Start a cluster with tiup playground --tiflash.config <(echo "tcp_port = 9000") --without-monitor
Run the TiFlash ddl integration tests (may need to run them a couple of times)

cd tiflash
(cd tests ; storage_bin=~/.tiup/components/tiflash/v7.3.0/tiflash/tiflash sh run-test.sh fullstack-test2/ddl)

2. What did you expect to see? (Required)

Success

3. What did you see instead (Required)

fullstack-test2/ddl/alter_column_datetime.test: Running
  File: fullstack-test2/ddl/alter_column_datetime.test
  Error line: 23
  Error: set session tidb_isolation_read_engines='tiflash'; select * from test.a1 order by id;
  Result:
    ERROR 1815 (HY000) at line 1: Internal : Can't find a proper physical plan for this query
  Expected:
    +----+---------------------+---------------------+----------+
    | id | atime               | btime               | ctime    |
    +----+---------------------+---------------------+----------+
    |  1 | 2023-01-01 11:11:11 | 2023-01-01 11:11:11 | 11:11:11 |
    |  2 | 2023-02-01 02:22:22 | 2023-02-01 02:22:22 | 02:22:22 |
    |  3 | 2023-03-01 03:33:33 | 2023-03-01 03:33:33 | 03:33:33 |
    +----+---------------------+---------------------+----------+

tidb.log

[2023/09/04 14:04:57.484 +02:00] [WARN] [session.go:2255] ["compile SQL failed"] [conn=3688892068] [error="[planner:1815]Internal : Can't find a proper physical plan for this query"] [SQL="select * from test.a1 order by id"]
[2023/09/04 14:04:57.485 +02:00] [INFO] [conn.go:1081] ["command dispatched failed"] [conn=3688892068] [connInfo="id:3688892068, addr:127.0.0.1:59788 status:10, collation:utf8mb4_general_ci, user:root"] [command=Query] [status="inTxn:0, autocommit:1"] [sql="select * from test.a1 order by id"] [txn_mode=PESSIMISTIC] [timestamp=0] [err="[planner:1815]Internal : Can't find a proper physical plan for this query
github.com/pingcap/errors.AddStack
	/Users/pingcap/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20221009092201-b66cddb77c32/errors.go:174
github.com/pingcap/errors.(*Error).GenWithStackByArgs
	/Users/pingcap/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20221009092201-b66cddb77c32/normalize.go:164
github.com/pingcap/tidb/planner/core.physicalOptimize
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/planner/core/optimizer.go:1201
github.com/pingcap/tidb/planner/core.DoOptimizeAndLogicAsRet
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/planner/core/optimizer.go:314
github.com/pingcap/tidb/planner/core.DoOptimize
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/planner/core/optimizer.go:339
github.com/pingcap/tidb/planner.optimize
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/planner/optimize.go:514
github.com/pingcap/tidb/planner.Optimize
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/planner/optimize.go:337
github.com/pingcap/tidb/planner/core.generateNewPlan
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/planner/core/plan_cache.go:302
github.com/pingcap/tidb/planner/core.GetPlanFromSessionPlanCache
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/planner/core/plan_cache.go:205
github.com/pingcap/tidb/planner.getPlanFromNonPreparedPlanCache
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/planner/optimize.go:132
github.com/pingcap/tidb/planner.Optimize
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/planner/optimize.go:256
github.com/pingcap/tidb/executor.(*Compiler).Compile
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/executor/compiler.go:98
github.com/pingcap/tidb/session.(*session).ExecuteStmt
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:2225
github.com/pingcap/tidb/server.(*TiDBContext).ExecuteStmt
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/server/driver_tidb.go:291
github.com/pingcap/tidb/server.(*clientConn).handleStmt
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1993
github.com/pingcap/tidb/server.(*clientConn).handleQuery
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1784
github.com/pingcap/tidb/server.(*clientConn).dispatch
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1271
github.com/pingcap/tidb/server.(*clientConn).Run
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/server/conn.go:1050
github.com/pingcap/tidb/server.(*Server).onConn
	/Users/pingcap/workspace/build-common/go/src/github.com/pingcap/tidb/server/server.go:662
runtime.goexit
	/usr/local/go1.20.7/src/runtime/asm_arm64.s:1172"]

4. What is your TiDB version? (Required)

tidb> select tidb_version()\G
*************************** 1. row ***************************
tidb_version(): Release Version: v7.3.0
Edition: Community
Git Commit Hash: 40b72e7a9a4fc9670d4c5d974dd503a3c6097471
Git Branch: heads/refs/tags/v7.3.0
UTC Build Time: 2023-08-08 09:27:28
GoVersion: go1.20.7
Race Enabled: false
Check Table Before Drop: false
Store: tikv
1 row in set (0.00 sec)

tidb> select * from information_schema.cluster_info;
+---------+-----------------+-----------------+---------+------------------------------------------+---------------------------+--------------+-----------+
| TYPE    | INSTANCE        | STATUS_ADDRESS  | VERSION | GIT_HASH                                 | START_TIME                | UPTIME       | SERVER_ID |
+---------+-----------------+-----------------+---------+------------------------------------------+---------------------------+--------------+-----------+
| tidb    | 127.0.0.1:4000  | 127.0.0.1:10080 | 7.3.0   | 40b72e7a9a4fc9670d4c5d974dd503a3c6097471 | 2023-09-04T14:35:21+02:00 | 3m48.093754s |      1440 |
| pd      | 127.0.0.1:2379  | 127.0.0.1:2379  | 7.3.0   | 7cab1e942d08c24ff3dfdb1693ce5d93d908915f | 2023-09-04T14:35:11+02:00 | 3m58.093756s |         0 |
| tikv    | 127.0.0.1:20160 | 127.0.0.1:20180 | 7.3.0   | 076c6a03cba91b6e9a2e5b227a800f98a01c53e5 | 2023-09-04T14:35:14+02:00 | 3m55.093757s |         0 |
| tiflash | 127.0.0.1:3930  | 127.0.0.1:20292 | 7.3.0   | 71897688663b91c9b7419b3f193147a2a0a06035 | 2023-09-04T14:35:23+02:00 | 3m46.093757s |         0 |
+---------+-----------------+-----------------+---------+------------------------------------------+---------------------------+--------------+-----------+
4 rows in set (0.00 sec)
@mjonss mjonss added the type/bug The issue is confirmed as a bug. label Sep 4, 2023
@ti-chi-bot ti-chi-bot bot added may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 labels Sep 7, 2023
@jebter jebter added the sig/execution SIG execution label Sep 11, 2023
@mjonss
Copy link
Contributor Author

mjonss commented Sep 11, 2023

Test issue, I still had mysql> set @@global.tidb_allow_mpp = 0; in the test, basically blocking several tiflash operations.

@mjonss mjonss closed this as completed Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/tiflash feature/developing the related feature is in development may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 severity/major sig/execution SIG execution type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

3 participants