Skip to content

Commit

Permalink
Showing 3 changed files with 40 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drainer/schema.go
Original file line number Diff line number Diff line change
@@ -344,6 +344,8 @@ func skipUnsupportedDDLJob(job *model.Job) bool {
case model.ActionCreatePlacementPolicy, model.ActionAlterPlacementPolicy, model.ActionDropPlacementPolicy,
model.ActionAlterTablePartitionPlacement, model.ActionModifySchemaDefaultPlacement, model.ActionAlterTablePlacement:
return true
case model.ActionCreateResourceGroup, model.ActionAlterResourceGroup, model.ActionDropResourceGroup:
return true
}

return false
17 changes: 17 additions & 0 deletions tests/resource_control/drainer.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
data-dir = '/tmp/tidb_binlog_test/data.drainer'

[syncer]
txn-batch = 1
worker-count = 1
safe-mode = false
db-type = 'mysql'
replicate-do-db = ['resource_control_test']

[syncer.to]
host = '127.0.0.1'
user = 'root'
password = ''
port = 3306

[syncer.to.checkpoint]
schema = "resource_control_checkpoint"
21 changes: 21 additions & 0 deletions tests/resource_control/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/sh

set -e

cd "$(dirname "$0")"

run_drainer --compressor gzip &

sleep 3

run_sql 'CREATE DATABASE resource_control_test;'
run_sql 'CREATE RESOURCE GROUP rg1 RU_PER_SEC=10000;'
run_sql 'CREATE RESOURCE GROUP rg2 RU_PER_SEC=5000;'
run_sql 'ALTER RESOURCE GROUP rg1 RU_PER_SEC=10000, BURSTABLE;'
run_sql 'DROP RESOURCE GROUP rg2;'

sleep 3

run_sql 'DROP DATABASE resource_control_test;'

killall drainer

0 comments on commit 1807bf4

Please sign in to comment.