Skip to content

Commit

Permalink
Fix config, add test for mysql with ranges
Browse files Browse the repository at this point in the history
  • Loading branch information
proggga committed Sep 13, 2021
1 parent de21c46 commit ca4ed5e
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/sh
set -e -x

. /usr/local/export_common.sh

export WALE_S3_PREFIX=s3://mysqlfullxtrabackupbucket


mysqld --initialize --init-file=/etc/mysql/init.sql

service mysql start

sysbench --table-size=10 prepare

sysbench --time=5 run

mysql -e 'FLUSH LOGS'

mysqldump sbtest > /tmp/dump_before_backup

wal-g backup-push

mysql_kill_and_clean_data

export S3_RANGE_BATCH_ENABLED=true
wal-g backup-fetch LATEST

chown -R mysql:mysql $MYSQLDATA

service mysql start || (cat /var/log/mysql/error.log && false)

mysql_set_gtid_purged

mysqldump sbtest > /tmp/dump_after_restore

diff /tmp/dump_before_backup /tmp/dump_after_restore
2 changes: 1 addition & 1 deletion pkg/storages/s3/folder.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func (folder *Folder) getReaderSettings() (rangeEnabled bool, retriesCount int,
minRetryDelay, maxRetryDelay time.Duration) {
rangeEnabled = RangeBatchEnabledDefault
if rangeBatch, ok := folder.settings[RangeBatchEnabled]; ok {
if rangeBatch == "true" {
if strings.TrimSpace(strings.ToLower(rangeBatch)) == "true" {
rangeEnabled = true
} else {
rangeEnabled = false
Expand Down

0 comments on commit ca4ed5e

Please sign in to comment.