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

pitr restore data fail for "failed: raft entry is too large, region 170, entry size 8616655" #14313

Closed
seiya-annie opened this issue Mar 1, 2023 · 3 comments · Fixed by #14312 or #14490
Labels
affects-6.5 component/backup-restore Component: backup, import, external_storage severity/major type/bug Type: Issue - Confirmed a bug

Comments

@seiya-annie
Copy link

Bug Report

What version of TiKV are you using?

2.28 nightly

What operating system and CPU are you using?

Steps to reproduce

start log backup
do full backup every sometime
run paypay workload
do pitr restore with latest full backup repeatedly (clean target TiDB eachtime)

What did you expect?

pitr backup and restore works normal

What did happened?

failed: raft entry is too large, region 170, entry size 8616655; execute over region id:170 start_key:\"t\\200\\
000\\000\\000\\000\\000\\000\\377e_i\\200\\000\\000\\000\\000\\377\\000\\000\\001\\003\\200\\000\\000\\000\\377\\000
\\031\\014\\336\\000\\000\\000\\000\\373\" end_key:\"t\\200\\000\\000\\000\\000\\000\\000\\377e_i\\200\\000\\000\\00
0\\000\\377\\000\\000\\001\\003\\200\\000\\000\\000\\377\\000\\035O\\237\\000\\000\\000\\000\\373\" region_epoch:<co
nf_ver:1 version:158 > peers:<id:171 store_id:1 >  failed: raft entry is too large, region 170, entry size 8616655;
execute over region id:170 start_key:\"t\\200\\000\\000\\000\\000\\000\\000\\377e_i\\200\\000\\000\\000\\000\\377\\0
00\\000\\001\\003\\200\\000\\000\\000\\377\\000\\031\\014\\336\\000\\000\\000\\000\\373\" end_key:\"t\\200\\000\\000
\\000\\000\\000\\000\\377e_i\\200\\000\\000\\000\\000\\377\\000\\000\\001\\003\\200\\000\\000\\000\\377\\000\\035O\\
237\\000\\000\\000\\000\\373\" region_epoch:<conf_ver:1 version:158 > peers:<id:171 store_id:1 >  failed: raft entry
 is too large, region 170, entry size 8616655; execute over region id:170 start_key:\"t\\200\\000\\000\\000\\000\\00
0\\000\\377e_i\\200\\000\\000\\000\\000\\377\\000\\000\\001\\003\\200\\000\\000\\000\\377\\000\\031\\014\\336\\000\\
000\\000\\000\\373\" end_key:\"t\\200\\000\\000\\000\\000\\000\\000\\377e_i\\200\\000\\000\\000\\000\\377\\000\\000\
\001\\003\\200\\000\\000\\000\\377\\000\\035O\\237\\000\\000\\000\\000\\373\" region_epoch:<conf_ver:1 version:158 >
 peers:<id:171 store_id:1 >  failed: raft entry is too large, region 170, entry size 8616655; execute over region id
:170 start_key:\"t\\200\\000\\000\\000\\000\\000\\000\\377e_i\\200\\000\\000\\000\\000\\377\\000\\000\\001\\003\\200
\\000\\000\\000\\377\\000\\031\\014\\336\\000\\000\\000\\000\\373\" end_key:\"t\\200\\000\\000\\000\\000\\000\\000\\
377e_i\\200\\000\\000\\000\\000\\377\\000\\000\\001\\003\\200\\000\\000\\000\\377\\000\\035O\\237\\000\\000\\000\\00
0\\373\" region_epoch:<conf_ver:1 version:158 > peers:<id:171 store_id:1 >  failed: raft entry is too large, region
170, entry size 8616655\n", "error": "command terminated with exit code 1"} 
@seiya-annie
Copy link
Author

@YuJuncen
Copy link
Contributor

YuJuncen commented Mar 2, 2023

I think this is because we replaced the RaftStoreRouter by the Engine trait at #14294, where we have only calculated the size of the write itself, hence won't affect release-6.5.

ti-chi-bot pushed a commit that referenced this issue Mar 2, 2023
close #14313

Signed-off-by: hillium <yujuncen@pingcap.com>

Co-authored-by: Xinye Tao <xy.tao@outlook.com>
ti-chi-bot pushed a commit to ti-chi-bot/tikv that referenced this issue Mar 2, 2023
close tikv#14313

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
ti-chi-bot pushed a commit to ti-chi-bot/tikv that referenced this issue Mar 2, 2023
close tikv#14313

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@YuJuncen YuJuncen reopened this Mar 30, 2023
@YuJuncen
Copy link
Contributor

This may happen in v6.5.1 in some scenarios. Perhaps due to we haven't computed the wire header for EACH REQUEST.

I think we should batch upto 1/2 of the raft_max_size.

ti-chi-bot pushed a commit that referenced this issue Apr 10, 2023
close #14313

Signed-off-by: hillium <yujuncen@pingcap.com>

Co-authored-by: Xinye Tao <xy.tao@outlook.com>
ti-chi-bot pushed a commit to ti-chi-bot/tikv that referenced this issue Apr 10, 2023
close tikv#14313

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
ti-chi-bot added a commit that referenced this issue Apr 12, 2023
close #14313, ref #14490

Signed-off-by: hillium <yujuncen@pingcap.com>

Co-authored-by: hillium <yujuncen@pingcap.com>
Co-authored-by: tonyxuqqi <tonyxuqi@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.5 component/backup-restore Component: backup, import, external_storage severity/major type/bug Type: Issue - Confirmed a bug
Projects
None yet
5 participants