Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

Failed to import tpcc data due to column count not match value count in item table #503

Closed
gengliqi opened this issue Dec 2, 2020 · 2 comments

Comments

@gengliqi
Copy link

gengliqi commented Dec 2, 2020

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    Import tpcc data which is generated by go-tpc to TiDB.
    Then I meet this error
[2020/12/02 01:44:33.043 +08:00] [ERROR] [main.go:83] ["tidb lightning encountered error stack info"] [error="restore table `tpcc`.`item` failed: Error 1136: Column count doesn't match value count at row 1"] [errorVerbose="Error 1136: Column count doesn't match value count at row 1\ngithub.com/pingcap/errors.AddStack\n\t/home/jenkins/agent/workspace/ld_lightning_multi_branch_v4.0.8/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20200917111840-a15ef68f753d/errors.go:174\ngithub.com/pingcap/errors.Trace\n\t/home/jenkins/agent/workspace/ld_lightning_multi_branch_v4.0.8/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20200917111840-a15ef68f753d/juju_adaptor.go:15\ngithub.com/pingcap/tidb-lightning/lightning/backend.(*tidbBackend).WriteRows\n\t/home/jenkins/agent/workspace/ld_lightning_multi_branch_v4.0.8/go/src/github.com/pingcap/tidb-lightning/lightning/backend/tidb.go:356\ngithub.com/pingcap/tidb-lightning/lightning/backend.(*OpenedEngine).WriteRows\n\t/home/jenkins/agent/workspace/ld_lightning_multi_branch_v4.0.8/go/src/github.com/pingcap/tidb-lightning/lightning/backend/backend.go:273\ngithub.com/pingcap/tidb-lightning/lightning/restore.(*chunkRestore).deliverLoop\n\t/home/jenkins/agent/workspace/ld_lightning_multi_branch_v4.0.8/go/src/github.com/pingcap/tidb-lightning/lightning/restore/restore.go:1709\ngithub.com/pingcap/tidb-lightning/lightning/restore.(*chunkRestore).restore.func2\n\t/home/jenkins/agent/workspace/ld_lightning_multi_branch_v4.0.8/go/src/github.com/pingcap/tidb-lightning/lightning/restore/restore.go:1907\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1357\nrestore table `tpcc`.`item` failed"]
[2020/12/02 01:44:33.044 +08:00] [ERROR] [main.go:84] ["tidb lightning encountered error"] [error="restore table `tpcc`.`item` failed: Error 1136: Column count doesn't match value count at row 1"]

The max id in item table is 68480.
image

I check the item csv which go-tpc was generated before.
The number of columns in all rows is 5, which is ok.
image

  1. What did you expect to see?
    Data imported successfully.

  2. What did you see instead?
    Failed.

  3. Versions of the cluster

    • TiDB-Lightning version (run tidb-lightning -V):

      Release Version: v4.0.8
      Git Commit Hash: 6887f4e6b49bb9f32f3d3f137e00bc7bfa248074
      Git Branch: heads/refs/tags/v4.0.8
      UTC Build Time: 2020-10-30 08:14:25
      Go Version: go version go1.13 linux/amd64
      
    • TiKV-Importer version (run tikv-importer -V)

      (paste TiKV-Importer version here)
      
    • TiKV version (run tikv-server -V):

      v4.0.8
      
    • TiDB cluster version (execute SELECT tidb_version(); in a MySQL client):

      v4.0.8
      
    • Other interesting information (system version, hardware config, etc):

  4. Operation logs

  5. Configuration of the cluster and the task

  6. Screenshot/exported-PDF of Grafana dashboard or metrics' graph in Prometheus for TiDB-Lightning if possible

@glorv
Copy link
Contributor

glorv commented Dec 2, 2020

@gengliqi thanks for the report. The error log shows that the following wrong statements:

[stmt="REPLACE INTO `tpcc`.`item`(`i_id`,`i_id`,`i_id`,`i_id`,`i_id`,`i_id`,`i_im_id`,`i_name`,`i_price`,`i_data`) VALUES('67745','4450','pHIx7TqZCQMHdTK','23.220000','gyvfXnglMC7T5GAxBvcxi9iAxT')...

So this should refer to this #437 issue. Could you use the newest nightly version and try again?

@glorv
Copy link
Contributor

glorv commented Dec 2, 2020

closed by #437

@glorv glorv closed this as completed Dec 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants