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

Concurrent migrations #9192

Merged
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
cb45d58
reading all ready migrations, running one
shlomi-noach Nov 11, 2021
db69952
check nil value
shlomi-noach Nov 11, 2021
ea3200f
select required columns
shlomi-noach Nov 14, 2021
2e979d5
support -allow-concurrent flag in ddl_strategy
shlomi-noach Nov 14, 2021
766e764
onlineddl scheduler allows running concurrent, non-conflicting migrat…
shlomi-noach Nov 14, 2021
451e018
fix column name
shlomi-noach Nov 14, 2021
f80f515
ignore UUID of the very reverting migration when checking for conflic…
shlomi-noach Nov 14, 2021
2fa94c0
better naming
shlomi-noach Nov 14, 2021
78de043
adding endtoend test: onlineddl_scheduler
shlomi-noach Nov 14, 2021
eacbc47
more testing
shlomi-noach Nov 14, 2021
c5a9b8d
Wrapping in sub tests
shlomi-noach Nov 14, 2021
c5b4daf
safeguard: require one successful execution of reviewRunningMigration…
shlomi-noach Nov 15, 2021
70995df
safeguard: require one successful execution of reviewRunningMigration…
shlomi-noach Nov 15, 2021
1d44d80
updated singleton tests with new logic (migration can be 'ready' rath…
shlomi-noach Nov 15, 2021
c6ba988
more tests: check blocked migration does not stand in the way of new …
shlomi-noach Nov 15, 2021
1503d5b
it is possible, and required, to have multiple 'ready' migrations. Th…
shlomi-noach Nov 15, 2021
74490dc
code comment
shlomi-noach Nov 15, 2021
bf5c8c5
faster singleton tests
shlomi-noach Nov 15, 2021
0935b7d
endtoend: test for empty uuid
shlomi-noach Nov 15, 2021
25c9093
unit test for -allow-concurrent
shlomi-noach Nov 15, 2021
8dcfe0d
more endtoend checks
shlomi-noach Nov 15, 2021
782579f
Merge branch 'main' into online-ddl-concurrent-revert-migrations
shlomi-noach Nov 18, 2021
0143e7d
merged main; resolved conflict
shlomi-noach Nov 21, 2021
eebdf20
merged main; resolved conflict
shlomi-noach Dec 5, 2021
d4582a9
merge conflict resolved
shlomi-noach Dec 5, 2021
82c2eaf
merged main; resolved conflict
shlomi-noach Dec 9, 2021
9dee14e
Language, grammar, typos and clarity, per review
shlomi-noach Dec 12, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions .github/workflows/cluster_endtoend_onlineddl_scheduler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows"

name: Cluster (onlineddl_scheduler)
on: [push, pull_request]
concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_scheduler)')
cancel-in-progress: true

env:
LAUNCHABLE_ORGANIZATION: "vitess"
LAUNCHABLE_WORKSPACE: "vitess-app"
GITHUB_PR_HEAD_SHA: "${{ github.event.pull_request.head.sha }}"

jobs:
build:
name: Run endtoend tests on Cluster (onlineddl_scheduler)
runs-on: ubuntu-18.04

steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17

- name: Set up python
uses: actions/setup-python@v2

- name: Tune the OS
run: |
echo '1024 65535' | sudo tee -a /proc/sys/net/ipv4/ip_local_port_range

# TEMPORARY WHILE GITHUB FIXES THIS https://github.com/actions/virtual-environments/issues/3185
- name: Add the current IP address, long hostname and short hostname record to /etc/hosts file
run: |
echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts
# DON'T FORGET TO REMOVE CODE ABOVE WHEN ISSUE IS ADRESSED!

- name: Check out code
uses: actions/checkout@v2

- name: Get dependencies
run: |
sudo apt-get update
sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata
sudo service mysql stop
sudo service etcd stop
sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
go mod download

# install JUnit report formatter
go get -u github.com/vitessio/go-junit-report@HEAD

wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb
sudo apt-get install -y gnupg2
sudo dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb
sudo apt-get update
sudo apt-get install percona-xtrabackup-24

- name: Setup launchable dependencies
run: |
# Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up
pip3 install --user launchable~=1.0 > /dev/null

# verify that launchable setup is all correct.
launchable verify || true

# Tell Launchable about the build you are producing and testing
launchable record build --name "$GITHUB_RUN_ID" --source .

- name: Run cluster endtoend test
timeout-minutes: 30
run: |
source build.env

set -x

# run the tests however you normally do, then produce a JUnit XML file
eatmydata -- go run test.go -docker=false -follow -shard onlineddl_scheduler | tee -a output.txt | go-junit-report -set-exit-code > report.xml

- name: Print test output and Record test result in launchable
run: |
# send recorded tests to launchable
launchable record tests --build "$GITHUB_RUN_ID" go-test . || true

# print test output
cat output.txt
if: always()
1 change: 0 additions & 1 deletion doc/releasenotes/13_0_0_summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ A new query is supported:
```sql
alter vitess_migration '9748c3b7_7fdb_11eb_ac2c_f875a4d24e90' cleanup
```

This query tells Vitess that a migration's artifacts are good to be cleaned up asap. This allows Vitess to free disk resources sooner. As a reminder, once a migration's artifacts are cleaned up, the migration is no
longer revertible.

Expand Down
Loading