pingcap / pingcap/tidb

Items in slow log file may not be ordered by time

Open
#34,381 1 comment 1 reaction 1 assignee Claimed by @crazycs520 View on GitHub
type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Enhancement

When doing some tests, we met a case where the slow query items in the slow log are not ordered by time. This is in contradiction with the assumptions in the slow_query system table logic.

This makes queries like `select xxx from slow_query where time = xxx` return an empty result when there're slow query items satisfying the condition in fact.

The slow log file is attached below and is not manually modified. We need to investigate why this happened and how to avoid this.

[tidb_slow_query.log](https://github.com/pingcap/tidb/files/8629479/tidb_slow_query.log)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.