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

Lightning import error: init table allocator base failed: commit transaction failed: Error 9007: Write conflict #31376

Closed
fubinzh opened this issue Jan 6, 2022 · 1 comment · Fixed by #31484
Assignees
Labels
affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects the 5.4.x(LTS) versions. component/lightning This issue is related to Lightning of TiDB. severity/major type/bug The issue is confirmed as a bug.

Comments

@fubinzh
Copy link

fubinzh commented Jan 6, 2022

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Jenkins CI fails when running case: lightning_duplicate_detection

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

Case passed

3. What did you see instead (Required)

Case failed due to error "Error: restore table dup_detect.tb failed: init table allocator base failed: commit transaction failed: Error 9007: Write conflict, txnStartTS=430280826485735492, conflictStartTS=430280826485735498, conflictCommitTS=0, key={tableID=137, handle=4} primary=[]byte(nil) [try again later]"
For details, refer to: https://ci.pingcap.net/blue/organizations/jenkins/br_ghpr_unit_and_integration_test/detail/br_ghpr_unit_and_integration_test/9376/pipeline/103/

[2022-01-05T13:58:09.736Z] + echo '[Wed Jan  5 21:58:09 CST 2022] <<<<<< RUNNING TEST FOR: tests/lightning_duplicate_detection --backend' local --sorted-kv-dir /tmp/backup_restore_test/lightning_duplicate_detection.sorted1 --enable-checkpoint=1 --log-file /tmp/backup_restore_test/lightning-duplicate-detection1.log --config 'tests/lightning_duplicate_detection/config1.toml >>>>>>'

[2022-01-05T13:58:09.736Z] + echo '[Wed Jan  5 21:58:09 CST 2022] <<<<<< RUNNING TEST FOR: tests/lightning_duplicate_detection --backend' local --sorted-kv-dir /tmp/backup_restore_test/lightning_duplicate_detection.sorted2 --enable-checkpoint=1 --log-file /tmp/backup_restore_test/lightning-duplicate-detection2.log --config 'tests/lightning_duplicate_detection/config2.toml >>>>>>'

[2022-01-05T13:58:09.737Z] + bin/tidb-lightning.test -test.coverprofile=/tmp/backup_restore_test/cov.lightning_duplicate_detection.1526.out DEVEL --ca /tmp/backup_restore_test/certs/ca.pem --cert /tmp/backup_restore_test/certs/lightning.pem --key /tmp/backup_restore_test/certs/lightning.key --log-file /tmp/backup_restore_test/lightning.log --tidb-port 4000 --pd-urls 127.0.0.1:2379 --config tests/lightning_duplicate_detection/config.toml -d tests/lightning_duplicate_detection/data --importer 127.0.0.1:8808 --sorted-kv-dir /tmp/backup_restore_test/lightning_duplicate_detection.sorted --enable-checkpoint=0 --check-requirements=0 --backend local --sorted-kv-dir /tmp/backup_restore_test/lightning_duplicate_detection.sorted1 --enable-checkpoint=1 --log-file /tmp/backup_restore_test/lightning-duplicate-detection1.log --config tests/lightning_duplicate_detection/config1.toml

[2022-01-05T13:58:09.737Z] + bin/tidb-lightning.test -test.coverprofile=/tmp/backup_restore_test/cov.lightning_duplicate_detection.1527.out DEVEL --ca /tmp/backup_restore_test/certs/ca.pem --cert /tmp/backup_restore_test/certs/lightning.pem --key /tmp/backup_restore_test/certs/lightning.key --log-file /tmp/backup_restore_test/lightning.log --tidb-port 4000 --pd-urls 127.0.0.1:2379 --config tests/lightning_duplicate_detection/config.toml -d tests/lightning_duplicate_detection/data --importer 127.0.0.1:8808 --sorted-kv-dir /tmp/backup_restore_test/lightning_duplicate_detection.sorted --enable-checkpoint=0 --check-requirements=0 --backend local --sorted-kv-dir /tmp/backup_restore_test/lightning_duplicate_detection.sorted2 --enable-checkpoint=1 --log-file /tmp/backup_restore_test/lightning-duplicate-detection2.log --config tests/lightning_duplicate_detection/config2.toml

[2022-01-05T13:58:09.737Z] Verbose debug logs will be written to /tmp/backup_restore_test/lightning-duplicate-detection2.log

[2022-01-05T13:58:09.737Z] 

[2022-01-05T13:58:09.737Z] Verbose debug logs will be written to /tmp/backup_restore_test/lightning-duplicate-detection1.log

[2022-01-05T13:58:09.737Z] 

[2022-01-05T13:58:16.303Z] 

[2022-01-05T13:58:16.303Z] Import Data Error Summary: 

[2022-01-05T13:58:16.303Z] +---+---------------------+-------------+------------------------------------- ~

[2022-01-05T13:58:16.303Z] | # | ERROR TYPE          | ERROR COUNT | ERROR DATA TABLE                     ~

[2022-01-05T13:58:16.303Z] +---+---------------------+-------------+------------------------------------- ~

[2022-01-05T13:58:16.303Z] | 1 | Unique Key Conflict |          81 | `lightning_task_info`.`conflict_erro ~

[2022-01-05T13:58:16.303Z] +---+---------------------+-------------+------------------------------------- ~

[2022-01-05T13:58:16.303Z] 

[2022-01-05T13:58:16.303Z] Error: restore table `dup_detect`.`tb` failed: init table allocator base failed: commit transaction failed: Error 9007: Write conflict, txnStartTS=430280826485735492, conflictStartTS=430280826485735498, conflictCommitTS=0, key={tableID=137, handle=4} primary=[]byte(nil) [try again later]

[2022-01-05T13:58:16.303Z] tidb lightning encountered error:  restore table `dup_detect`.`tb` failed: init table allocator base failed: commit transaction failed: Error 9007: Write conflict, txnStartTS=430280826485735492, conflictStartTS=430280826485735498, conflictCommitTS=0, key={tableID=137, handle=4} primary=[]byte(nil) [try again later]

[2022-01-05T13:58:16.561Z] 

[2022-01-05T13:58:16.561Z] Import Data Error Summary: 

[2022-01-05T13:58:16.561Z] +---+---------------------+-------------+------------------------------------- ~

[2022-01-05T13:58:16.561Z] | # | ERROR TYPE          | ERROR COUNT | ERROR DATA TABLE                     ~

[2022-01-05T13:58:16.561Z] +---+---------------------+-------------+------------------------------------- ~

[2022-01-05T13:58:16.561Z] | 1 | Unique Key Conflict |         114 | `lightning_task_info`.`conflict_erro ~

[2022-01-05T13:58:16.561Z] +---+---------------------+-------------+------------------------------------- ~

4. What is your TiDB version? (Required)

["Welcome to TiDB-Lightning"] [release-version=v5.0.0-master] [git-hash=None] [git-branch=None] [go-version=go1.16.4]

@github-actions
Copy link

Please check whether the issue should be labeled with 'affects-x.y' or 'fixes-x.y.z', and then remove 'needs-more-info' label.

@jebter jebter added affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects the 5.4.x(LTS) versions. labels Jan 18, 2022
YuJuncen pushed a commit to pingcap/br that referenced this issue Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects the 5.4.x(LTS) versions. component/lightning This issue is related to Lightning of TiDB. severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants