-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
v4.0.13 report inconsistent index handles #24868
Comments
The distsql index fetch, the result |
The reproduce steps: tidb config
|
Without the |
v4.0.12 could reproduce this issue using the configuration mentioned above.
|
|
It has been fixed in master and 5.0 by #20220 |
It's caused by streaming which we don't want to use again. FYI: #20759 |
@seiya-annie @wjhuang2016 /cc @zz-jason |
hi, i closed enable-streaming and reload tidb: [2021/05/26 11:16:22.758 +08:00] [ERROR] [projection.go:456] ["projection executor panicked"] [error="runtime error: index out of range [7] with length 7"] [stack="goroutine 901780 [running]:\ngithub.com/pingcap/tidb/util.GetStack(...)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/util/misc.go:75\ngithub.com/pingcap/tidb/executor.recoveryProjection(0xc001360f30, 0x3177940, 0xc001966100)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/projection.go:455 +0x90\ngithub.com/pingcap/tidb/executor.(*projectionInputFetcher).run.func1(0xc00147ef80, 0xc000fe23e0)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/projection.go:357 +0x82\npanic(0x3177940, 0xc001966100)\n\t/usr/local/go/src/runtime/panic.go:679 +0x1b2\ngithub.com/pingcap/tidb/util/chunk.MutRow.SetDatum(0xc0012eca00, 0x0, 0x7, 0x1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, ...)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/util/chunk/mutrow.go:287 +0x750\ngithub.com/pingcap/tidb/util/chunk.MutRow.SetDatums(0xc0012eca00, 0x0, 0xc00024e480, 0xe, 0xe)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/util/chunk/mutrow.go:281 +0xe6\ngithub.com/pingcap/tidb/table/tables.(*partitionedTable).locateRangePartition(0xc000ecbe40, 0x391a220, 0xc00124ab40, 0xc001680a10, 0xc00024e480, 0xe, 0xe, 0x0, 0x0, 0x0)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/table/tables/partition.go:428 +0x4cc\ngithub.com/pingcap/tidb/table/tables.(*partitionedTable).locatePartition(0xc000ecbe40, 0x391a220, 0xc00124ab40, 0xc001680a10, 0xc00024e480, 0xe, 0xe, 0x0, 0x0, 0x0)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/table/tables/partition.go:355 +0x9a\ngithub.com/pingcap/tidb/table/tables.(*partitionedTable).GetPartitionByRow(0xc000ecbe40, 0x391a220, 0xc00124ab40, 0xc00024e480, 0xe, 0xe, 0xe, 0xe, 0x0, 0x0)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/table/tables/partition.go:518 +0x8d\ngithub.com/pingcap/tidb/executor.(*SelectLockExec).Next(0xc001e55680, 0x38d2c20, 0xc001f88330, 0xc001e67a90, 0x0, 0x0)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/executor.go:916 +0x445\ngithub.com/pingcap/tidb/executor.Next(0x38d2c20, 0xc001f88330, 0x38dcfa0, 0xc001e55680, 0xc001e67a90, 0x0, 0x0)\n\t/home/jenkins/agent/workspace/optimization-buil |
@seiya-annie |
enable-streaming has been deprecated in #20760 |
Please edit this comment or add a new comment to complete the following informationNot a bug
Duplicate bug
BugNote: Make Sure that 'component', and 'severity' labels are added 1. Root Cause Analysis (RCA) (optional)2. Symptom (optional)3. All Trigger Conditions (optional)4. Workaround (optional)5. Affected versions6. Fixed versions |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
MySQL [tptest]> select txn, seq, stmt, is_query from stmt where test_id = "37b7a23b-af9e-4e8f-82d4-76699d877361";
ERROR 1105 (HY000): inconsistent index PRIMARY handle count 146 isn't equal to value count 0
MySQL [tptest]>
-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| stmt | CREATE TABLE
stmt
(test_id
char(36) NOT NULL,seq
int(11) NOT NULL,txn
int(11) NOT NULL,stmt
text NOT NULL,is_query
tinyint(1) DEFAULT NULL,PRIMARY KEY (
test_id
,seq
)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin |
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2. What did you expect to see? (Required)
3. What did you see instead (Required)
[2021/05/24 22:28:35.006 +08:00] [ERROR] [distsql.go:1044] ["inconsistent index handles"] [conn=10] [index=PRIMARY] [index_cnt=146] [table_cnt=0] [missing_handles="[612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049,612489557912322049]"] ...
[2021/05/24 22:28:35.007 +08:00] [INFO] [conn.go:800] ["command dispatched failed"] [conn=10] [connInfo="id:10, addr:172.16.5.197:38870 status:11, collation:utf8mb4_general_ci, user:root"] [command=Execute] [status="inTxn:1, autocommit:1"] [sql="select txn, seq, stmt, is_query from stmt where test_id = ? order by txn, seq [arguments: 37b7a23b-af9e-4e8f-82d4-76699d877361]"] [txn_mode=PESSIMISTIC] [err="inconsistent index PRIMARY handle count 146 isn't equal to value count 0\ngithub.com/pingcap/tidb/executor.(*tableWorker).executeTask\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/distsql.go:1051\ngithub.com/pingcap/tidb/executor.(*tableWorker).pickAndExecTask\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/distsql.go:867\ngithub.com/pingcap/tidb/executor.(*IndexLookUpExecutor).startTableWorker.func1\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/distsql.go:524\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1357\nselect txn, seq, stmt, is_query from stmt where test_id = ? order by txn, seq [arguments: 37b7a23b-af9e-4e8f-82d4-76699d877361]"]
4. What is your TiDB version? (Required)
| Release Version: v4.0.13
Edition: Community
Git Commit Hash: 57fa70a
Git Branch: heads/refs/tags/v4.0.13
UTC Build Time: 2021-05-24 09:13:43
GoVersion: go1.13
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false |
The text was updated successfully, but these errors were encountered: