Skip to content

Logs and metrics pertaining resolved_ts gap can be wrong if TSO fetch fails #17989

@ekexium

Description

@ekexium

Bug Report

// Ignore get tso errors since we will retry every `advdance_ts_interval`.
let mut min_ts = pd_client.get_tso().await.unwrap_or_default();
if let Ok(mut last_pd_tso) = last_pd_tso.try_lock() {
*last_pd_tso = Some((min_ts, Instant::now()));
}

last_pd_tso may be updated to 0.

The field is only used for diagnosis.
The consequence can be misleading gaps in logs and metrics, but not correctness risks.

What version of TiKV are you using?

master and versions in [v7.3, v8.5]

What operating system and CPU are you using?

Steps to reproduce

What did you expect?

What did happened?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions