Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PXB-1627: Support obtaining binary log coordinates from performance_s… #537

Merged
merged 1 commit into from
Sep 20, 2018

Conversation

gl-sergei
Copy link
Contributor

…chema.log_status

Implementation details:

At the beginning of the backup PXB detecting is there any MyISAM
tables to backup and whether the server is a GTID slave with auto
positioning.

Privileges needed to query p_s.log_status table are checked if
privilege check was requested.

Log copying thread has changed to stop at specific LSN. Log recovery
modified to take a final LSN to recover up to.

--binlog-info option has been removed, binary log info always
stored during the backup. Code related to LOCK BACKUP FOR BINLOG
removed because this feature won't be ported to PS 8.

Final stage of the backup now looks like following:

  1. Issue FTWRL is needed. Conditions for FTWRL are:
    • MyISAM tables
    • -slave-info is specified and server is not a GTID slave with
      auto positioning
  2. Copy MyISAM tables
  3. Query p_s.log_status, save LSN and binary log position
  4. Query SHOW SLAVE STATUS if -slave-info is specified
  5. Stop log copying thread at the LSN obtained from log_status
  6. Unlock tables if they were locked at step 1

Tests changed:

binlog_info.sh: test that binlog info is always created during the
backup stage

bug1277403.sh: create MyISAM table to force FTWRL

bug1343722.sh: produce the workload on the server we backing up

bug1630841.sh: privileges adjusted

ib_slave_info.sh: check whether FTWRL was used

kill_long_selects.sh: create MyISAM table to force FTWRL

pxb-1569.sh: privileges adjusted

…chema.log_status

Implementation details:

At the beginning of the backup PXB detecting is there any MyISAM
tables to backup and whether the server is a GTID slave with auto
positioning.

Privileges needed to query `p_s.log_status` table are checked if
privilege check was requested.

Log copying thread has changed to stop at specific LSN. Log recovery
modified to take a final LSN to recover up to.

`--binlog-info` option has been removed, binary log info always
stored during the backup. Code related to LOCK BACKUP FOR BINLOG
removed because this feature won't be ported to PS 8.

Final stage of the backup now looks like following:

1.  Issue FTWRL is needed. Conditions for FTWRL are:
    -   MyISAM tables
    -   `-slave-info` is specified and server is not a GTID slave with
        auto positioning
2.  Copy MyISAM tables
3.  Query `p_s.log_status`, save LSN and binary log position
4.  Query SHOW SLAVE STATUS if `-slave-info` is specified
5.  Stop log copying thread at the LSN obtained from `log_status`
6.  Unlock tables if they were locked at step 1

Tests changed:

`binlog_info.sh`: test that binlog info is always created during the
backup stage

`bug1277403.sh`: create MyISAM table to force FTWRL

`bug1343722.sh`: produce the workload on the server we backing up

`bug1630841.sh`: privileges adjusted

`ib_slave_info.sh`: check whether FTWRL was used

`kill_long_selects.sh`: create MyISAM table to force FTWRL

`pxb-1569.sh`: privileges adjusted
@gl-sergei
Copy link
Contributor Author

@gl-sergei gl-sergei merged commit 11162d1 into percona:8.0 Sep 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant