Skip to content

Commit

Permalink
Fix error taking a backup using PXB 8.0.35
Browse files Browse the repository at this point in the history
Latest versions of PXB support only one type of stream and
it should be specified using `=`. This fix makes it work for both 8.0.30
and recent versions.

Also decreased expected value of bytes read in the test for the backup,
it seems there was a changed which reduced it a bit.
  • Loading branch information
alexole committed May 14, 2024
1 parent ac4a17e commit e257dd1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ jobs:
percona-version: "8.0.32-26-1.focal"
python-version: "3.11"
ubuntu-version: "20.04"
- mysql-version: "8.0.35"
percona-version: "8.0.35-30-1.focal"
python-version: "3.11"
ubuntu-version: "20.04"

steps:
- id: checkout-code
Expand Down
3 changes: 1 addition & 2 deletions myhoard/basebackup_operation.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ def create_backup(self):
encryption_key_file.name,
"--no-version-check",
f"--parallel={self.copy_threads}",
"--stream",
"xbstream",
"--stream=xbstream",
"--target-dir",
self.temp_dir,
"--extra-lsndir",
Expand Down
4 changes: 2 additions & 2 deletions test/test_basebackup_operation.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ def stream_handler(stream):
assert op.binlog_info["file_name"] == master_status["File"]
assert op.binlog_info["file_position"] == master_status["Position"]

# Even almost empty backup is a few megs due to standard files that are always included
assert bytes_read[0] > 2 * 1024 * 1024
# Even almost empty backup is at least 1.5 megs due to standard files that are always included
assert bytes_read[0] > 1.5 * 1024 * 1024


def test_stream_handler_error_is_propagated(mysql_master):
Expand Down

0 comments on commit e257dd1

Please sign in to comment.