percona / percona/orchestrator

NextGTID method maybe not return right gtidSet

Open
#28 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
263
Forks
77
PR merge metrics
No merged PRs in 30d

Description

Current NextGTID method just return last gtidSet from Executed_Gtid_Set, this maybe not return right gtidset. Suppose a slave status like below:

                  Master_UUID: 72dbb469-82d1-11ee-b9bc-0202ac181657
             Master_Info_File: mysql.slave_master_info
                    SQL_Delay: 0
          SQL_Remaining_Delay: NULL
      Slave_SQL_Running_State: Replica has read all relay log; waiting for more updates
           Master_Retry_Count: 86400
                  Master_Bind: 
      Last_IO_Error_Timestamp: 
     Last_SQL_Error_Timestamp: 
               Master_SSL_Crl: 
           Master_SSL_Crlpath: 
           Retrieved_Gtid_Set: 5e2fa204-eedc-11ed-9cf0-0202ac18180a:23038810-23654750,
72dbb469-82d1-11ee-b9bc-0202ac181657:1-3595545
            Executed_Gtid_Set: 5e2fa204-eedc-11ed-9cf0-0202ac18180a:1-23654750,
72dbb469-82d1-11ee-b9bc-0202ac181657:1-3595545,
76dabae4-eedd-11ed-8a9b-0202ac18187d:1,
f7ad2759-82c9-11ee-bc83-0202ac181657:1
                Auto_Position: 1

Current NextGTID will return f7ad2759-82c9-11ee-bc83-0202ac181657:1, but right gtidSet is 72dbb469-82d1-11ee-b9bc-0202ac181657:1-3595545

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the NextGTID method and inspect how it selects a value from Executed_Gtid_Set. Reproduce the issue with the provided slave status, then verify that the returned GTID set is the expected 72dbb469-82d1-11ee-b9bc-0202ac181657 range rather than the final entry.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, mysql
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.