@@ -1962,7 +1962,7 @@ func (e *memtableRetriever) setDataForTiKVRegionStatus(ctx context.Context, sctx
1962
1962
for _ , tableID := range extractorTableIDs {
1963
1963
regionsInfo , err := e .getRegionsInfoForTable (ctx , tikvHelper , is , tableID )
1964
1964
if err != nil {
1965
- if errors .ErrorEqual (err , infoschema .ErrTableExists ) {
1965
+ if errors .ErrorEqual (err , infoschema .ErrTableNotExists ) {
1966
1966
continue
1967
1967
}
1968
1968
return err
@@ -1982,6 +1982,10 @@ func (e *memtableRetriever) setDataForTiKVRegionStatus(ctx context.Context, sctx
1982
1982
return err
1983
1983
}
1984
1984
}
1985
+ if allRegionsInfo == nil {
1986
+ return nil
1987
+ }
1988
+
1985
1989
tableInfos := tikvHelper .GetRegionsTableInfo (allRegionsInfo , is , nil )
1986
1990
for i := range allRegionsInfo .Regions {
1987
1991
regionTableList := tableInfos [allRegionsInfo .Regions [i ].ID ]
@@ -2006,7 +2010,7 @@ func (e *memtableRetriever) setDataForTiKVRegionStatus(ctx context.Context, sctx
2006
2010
func (e * memtableRetriever ) getRegionsInfoForTable (ctx context.Context , h * helper.Helper , is infoschema.InfoSchema , tableID int64 ) (* pd.RegionsInfo , error ) {
2007
2011
tbl , _ := is .TableByID (ctx , tableID )
2008
2012
if tbl == nil {
2009
- return nil , infoschema .ErrTableExists .GenWithStackByArgs (tableID )
2013
+ return nil , infoschema .ErrTableNotExists .GenWithStackByArgs (tableID )
2010
2014
}
2011
2015
2012
2016
pt := tbl .Meta ().GetPartitionInfo ()
0 commit comments