# Mysql 8.0 point in time recovery error - sequence number is inconsistent

**URL:** <https://forums.percona.com/t/mysql-8-0-point-in-time-recovery-error-sequence-number-is-inconsistent/29343>\
**Category:** Percona Server for MySQL\
**Created:** [March 25, 2024, 7:18pm UTC](https://forums.percona.com/t/mysql-8-0-point-in-time-recovery-error-sequence-number-is-inconsistent/29343 "2024-03-25T19:18:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ron](https://avatars.discourse-cdn.com/v4/letter/r/ecae2f/32.png) [@Ron](https://forums.percona.com/u/Ron)\
**Post date:** [March 25, 2024, 7:18pm UTC](https://forums.percona.com/t/mysql-8-0-point-in-time-recovery-error-sequence-number-is-inconsistent/29343/1 "2024-03-25T19:18:48Z")

</div>

Using relay logs to speed up the process of point in time recovery I run into an error.  
I’m testing this method to recover binlogs.

> **[Howto make MySQL point-in-time recovery faster ?](https://lefred.be/content/howto-make-mysql-point-in-time-recovery-faster/)**
>
> Before explaining how you can improve the speed for performing point-in-time recovery, let’s recall what is Point-In-Time Recovery and how it’s usually performed. Point-in-Time Recovery…

But for each relay binlog being recovered I will get one error:  
ERROR] [MY-010411] [Repl] Transaction’s sequence number is inconsistent with that of a preceding one: sequence\_number (1) \<= previous sequence\_number (xxxxxxx)  
I thought it might be that slave\_preserve\_commit\_order was not enabled, but even with it enabled I still encounter that error.  
Note: binlog\_order\_commits set is not set to ON for the Master.  
Thanks for the help.

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [March 26, 2024, 3:12pm UTC](https://forums.percona.com/t/mysql-8-0-point-in-time-recovery-error-sequence-number-is-inconsistent/29343/2 "2024-03-26T15:12:28Z")

</div>

Does this error always happen at the same place? (ie: always at the beginning of each log, or always at the end?) Have you dumped the verbose contents of the log and examined the sequence number manually to see if it really is out of order?

---

<div class="post-metadata">

**Author:** ![Ron](https://avatars.discourse-cdn.com/v4/letter/r/ecae2f/32.png) [@Ron](https://forums.percona.com/u/Ron)\
**Post date:** [March 26, 2024, 7:34pm UTC](https://forums.percona.com/t/mysql-8-0-point-in-time-recovery-error-sequence-number-is-inconsistent/29343/3 "2024-03-26T19:34:40Z")

</div>

Hi Matthew,  
I’ve dumped the verbose contents of bin-log.006410 but I’m not sure how to find the offset position in the binlog that it’s referring to? I assume the error is referring to the Read\_Master\_Log not the Relay\_Log?  
I think I take the Read\_Master\_Log\_Pos from the replica status and calculate from there, but where is the sequence\_number (1) coming from?

Here is my most recent test case error.  
Transaction’s sequence number is inconsistent with that of a preceding one: sequence\_number (1) \<= previous sequence\_number (1929667)

Here is information from replica status and master status.  
Master\_Log\_File: bin-log.006410  
Read\_Master\_Log\_Pos: 708184140  
Relay\_Log\_File: bin-log.000002  
Relay\_Log\_Pos: 1073742162  
Exec\_Master\_Log\_Pos: 1073742162

Master status  
File: bin-log.006410  
Position: 708184140

The start of the master binlog has this position info.  
at 4  
#240326 10:46:13 server id 12345678 end\_log\_pos 126 CRC32 0x7e689634 Start: binlog v 4, server v 8.0.32-24 created 240326 10:46:13 at startup  
Warning: this binlog is either in use or was not closed properly.  
ROLLBACK/_!_/;  
at 126

The end has this info.  
at 708184051  
#240323 21:34:38 server id 12345678 end\_log\_pos 708184140 CRC32 0x72090bb8 Query thread\_id=2369892 exec\_time=221900 error\_code=0  
SET TIMESTAMP=1711254878/_!_/;  
COMMIT

Thanks!
