【TiDB 使用环境】生产环境 /测试/ Poc
【TiDB 版本】
【操作系统】
【部署方式】云上部署(什么云)/机器部署(什么机器配置、什么硬盘)
【集群数据量】
【集群节点数】
正在上传:f706dc6650e332fef50b2c2e3a38b74.png…
【问题复现路径】
官方文档如下:
描述中说减小tso-update-physical-interval 可以获取超过262144个tso,但是从代码中来看如果超过了262144时会一直失败,代码如下:
tso/tso.go line 354 fn:func (t *timestampOracle) getTS(ctx context.Context, count uint32) (pdpb.Timestamp, error)
...
if resp.GetLogical() >= maxLogical {
log.Warn("logical part outside of max logical interval, please check ntp time, or adjust config item `tso-update-physical-interval`",
logutil.CondUint32("keyspace-group-id", t.keyspaceGroupID, t.keyspaceGroupID > 0),
zap.Reflect("response", resp),
zap.Int("retry-count", i), errs.ZapError(errs.ErrLogicOverflow))
t.metrics.logicalOverflowEvent.Inc()
time.Sleep(t.updatePhysicalInterval)
continue
}
// In case lease expired after the first check.
if !t.member.IsLeader() {
return pdpb.Timestamp{}, errs.ErrGenerateTimestamp.FastGenByArgs(fmt.Sprintf("requested %s anymore", errs.NotLeaderErr))
}
return resp, nil
}
如果超过了1 << 18个tso resp.GetLogical() >= maxLogical 总是会失败,所以无论tso刷新时间是多少,获取总会失败,有大佬看看这个是个bug吗
【遇到的问题:问题现象及影响】
【资源配置】进入到 TiDB Dashboard -集群信息 (Cluster Info) -主机(Hosts) 截图此页面
【复制黏贴 ERROR 报错的日志】
【其他附件:截图/日志/监控】