LP #1371774: pt-query-digest inconsistent rank order

Description

**Reported in Launchpad by Frank Cizmich last update 12-02-2015 15:14:47

This is a minor issue that only affects testing.

pt-query-digest (specifically the EventAggregator module) orders the top "worst" queries according to one or more pre-definable attribute values.
But when two values are equal, the sort algorithm sometimes inverts their order in different OSs.
This is innocuous to an end user, but causes false positives in the testing suite.

Sample output showing differences from testing run:

  1. < # 5 0xED69B13F3D0161D0 20661.0000 16.7% 1 20661.0000 0.00 UPDATE test?.tbl?

  2. < # 6 0x79BFEA84D0CED05F 20661.0000 16.7% 1 20661.0000 0.00 INSERT UPDATE test?.tbl?

  3. > # 5 0x79BFEA84D0CED05F 20661.0000 16.7% 1 20661.0000 0.00 INSERT UPDATE test?.tbl?

  4. > # 6 0xED69B13F3D0161D0 20661.0000 16.7% 1 20661.0000 0.00 UPDATE test?.tbl?

Simplest solution should be to tie-break using the query fingerprint.

Environment

None

Smart Checklist

Activity

Show:

Sveta Smirnova June 23, 2023 at 1:42 PM

Fixed by

Done

Details

Assignee

Reporter

Priority

Fix versions

Smart Checklist

Created January 24, 2018 at 5:32 PM
Updated June 30, 2023 at 4:34 PM
Resolved June 23, 2023 at 1:42 PM