Percona-Lab / query-playback

Query Playback
Other
106 stars 47 forks source link

slowlog: fix accuracy #35

Closed undingen closed 7 years ago

undingen commented 7 years ago

This fixes a bad bug I introduced which could result in queries getting executed in the wrong order. With this I'm seeing very low / no errors anymore when replaying. It also reverts the InnoDB transaction id change because it does not help at the moment but introduces further inaccuracies. I guess before I fixed the bug I just good lucky and the using the trx ids helped but now it's not needed anymore / makes things worse.

Bug fix: we have to adjust the start time so that inside every connection the start times of each query is the same as the previous one or later but never sooner than the previous query. This could happen because of inaccuracies in the slowlog and would result in the execution of queries in the wrong order because of the sorting we do.