-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
type/enhancementThe issue or PR belongs to an enhancement.The issue or PR belongs to an enhancement.
Description
Enhancement
use test;
drop table if exists t;
create table t (a int);
insert into t values (1);
alter table t add index i(a);
Output:
mysql> alter table t add index i(a);
Query OK, 0 rows affected (2.75 sec)
Log:
[WARN] [region_job.go:531] ["meet error and handle the job later"] ["job stage"=needRescan] [error="[Lightning:KV:EpochNotMatch]EpochNotMatch current epoch of region 22 is conf_ver: 1 version: 66"] [] [start=74800000000000006A5F698000000000000001038000000000000001038000000000000001] [end=74800000000000006A5F69800000000000000103800000000000000103800000000000000100]
You will almost certainly encounter an "EpochNotMatch" error when adding an index, and wait at least two seconds.
tidb/br/pkg/lightning/backend/local/local.go
Lines 1654 to 1658 in eb69dac
// max retry backoff time: 2+4+8+16+30*26=810s | |
sleepSecond := math.Pow(2, float64(job.retryCount)) | |
if sleepSecond > float64(maxRetryBackoffSecond) { | |
sleepSecond = float64(maxRetryBackoffSecond) | |
} |
Maybe we can improve this by synchronizing region splitting.
ywqzzy
Metadata
Metadata
Assignees
Labels
type/enhancementThe issue or PR belongs to an enhancement.The issue or PR belongs to an enhancement.