Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
18e5d4c
go/mysql: GTID event contains and returns lastCommitted and sequenceN…
shlomi-noach Jan 26, 2025
427349c
proto: VEventType has last_committed, sequence_number, must_save
shlomi-noach Jan 26, 2025
3242e14
adapt binlog_streamer
shlomi-noach Jan 26, 2025
78760b5
vstreamer reads and populates vevent.SequenceNumber, vevent.LastCommi…
shlomi-noach Jan 26, 2025
b5d19ce
benchmark CI job
shlomi-noach Jan 26, 2025
68506b6
VReplicationExperimentalFlagVPlayerParallel
shlomi-noach Jan 26, 2025
445571b
benchmark endtoend test
shlomi-noach Jan 26, 2025
37edb42
decorate events with EventGTID
shlomi-noach Jan 27, 2025
0d38020
decorate events with GTID
shlomi-noach Jan 27, 2025
d86850a
Enable writeset based binlog dependency tracking
mattlord Jan 28, 2025
b743481
worker-pos table
shlomi-noach Jan 28, 2025
715cda5
Merge branch 'parallel-vplayer' of github.com:planetscale/vitess into…
shlomi-noach Jan 28, 2025
6305ee1
make proto
shlomi-noach Feb 4, 2025
7b2e600
remove debug message (causes the benchmark to timeout)
shlomi-noach Feb 4, 2025
16d9f8d
vreplication controller has a dbClientGenerator; vplayer has initial …
shlomi-noach Feb 4, 2025
88fdaf5
initial code for parallel producer and parallel worker
shlomi-noach Feb 4, 2025
28e8716
store explicit GTID. not pos
shlomi-noach Feb 10, 2025
48c6f77
AppendGTIDSet
shlomi-noach Feb 10, 2025
8e9b661
read and write to vreplication_worker_pos
shlomi-noach Feb 10, 2025
fcf20f6
initial full implementation
shlomi-noach Feb 10, 2025
b923e15
fix query
shlomi-noach Feb 10, 2025
9caae85
check ctx.Done
shlomi-noach Feb 10, 2025
fd0a026
assign dbClientGen
shlomi-noach Feb 10, 2025
5fdc1ca
mark for completion only after throttling, or else cut-over is attemp…
shlomi-noach Feb 12, 2025
a89323f
include event's transaction timestamp
shlomi-noach Feb 12, 2025
1b6a828
read and write transaction timestamp
shlomi-noach Feb 12, 2025
24551c7
aggregateWorkersPos at the end of fetchAndApply goroutine
shlomi-noach Feb 12, 2025
b7dbd7a
more progress
shlomi-noach Feb 12, 2025
68d6d2a
sequentialize non-ROW events
shlomi-noach Feb 12, 2025
1a9c966
fix dbClient multithread use issue
shlomi-noach Feb 13, 2025
8f53bc0
better handle context timeout. No need to commit all
shlomi-noach Feb 16, 2025
a480d1d
only share first contiguous interval
shlomi-noach Feb 16, 2025
8aecc48
ensure rollback; no need to retry FIELD event as it's now sequentiali…
shlomi-noach Feb 16, 2025
9cd94e0
query to combine GTIDs from _vt.vreplication_worker_pos
shlomi-noach Feb 17, 2025
d704d70
GTIDSet: Empty() and InPlaceUnion() functions
shlomi-noach Feb 17, 2025
2373c6e
get rid of integer length
shlomi-noach Feb 17, 2025
e5eb846
get rid of worker's lastPos tracking. All tracking is in db
shlomi-noach Feb 17, 2025
a001729
sequentializing when rotating into a new binlog. Use MySQL query to a…
shlomi-noach Feb 17, 2025
b662663
use worker's commitFunc(). Send individual completed sequence numbers…
shlomi-noach Feb 17, 2025
710d3e0
clearer name
shlomi-noach Feb 17, 2025
af0ef08
faster bailout in Mysql56GTIDSet.Contains()
shlomi-noach Feb 17, 2025
3df5ee6
do not use InPlaceUnion()
shlomi-noach Feb 17, 2025
3a5781e
remove InPlaceUnion()
shlomi-noach Feb 17, 2025
9ebb1d5
reading completedSequenceNumbers in a goroutine, RWMutex protected. T…
shlomi-noach Feb 17, 2025
11b71dd
compute GTID aggregation query just once
shlomi-noach Feb 17, 2025
7497d2d
cleanup
shlomi-noach Feb 17, 2025
e4638aa
Throttler: reduce regexp/string allocations by pre-computing pascal case
shlomi-noach Feb 18, 2025
b0b0978
scope testing
shlomi-noach Feb 18, 2025
ab4c566
typo
shlomi-noach Feb 18, 2025
64dfb2e
reduce alloc/GC by not parsing worker GTID and using strings. Sending…
shlomi-noach Feb 18, 2025
b51f236
compute in-transation pos updates in-memory, and only apply at commit…
shlomi-noach Feb 18, 2025
708de8f
GenerateUpdateWorkerPos receives string arg
shlomi-noach Feb 18, 2025
2e9d393
Revert "remove InPlaceUnion()"
shlomi-noach Feb 18, 2025
5469e0d
worker appends pos in-place (small GTID evaluation optimization)
shlomi-noach Feb 18, 2025
77f4a3a
reintroduce AppendGTIDSetInPlace
shlomi-noach Feb 18, 2025
43c9e45
decorate VEvent with PinWorker
shlomi-noach Feb 18, 2025
29a2c5e
decorate VEvent with Skippable
shlomi-noach Feb 19, 2025
014fe16
remove unused function ReadVReplicationCombinedWorkersGTIDs
shlomi-noach Feb 19, 2025
632e265
Multiple improvements:
shlomi-noach Feb 19, 2025
a56023d
increase pos varchar length
shlomi-noach Feb 19, 2025
94948c7
increase varbinary length
shlomi-noach Feb 19, 2025
2d005f6
introduce, but not use yet, considerCommitWorkerEvent(). It doesn't s…
shlomi-noach Feb 19, 2025
89974db
add profiling; track vreplication lag
shlomi-noach Feb 19, 2025
1af732a
AddGTIDInPlace, AppendGTIDInPlace
shlomi-noach Feb 20, 2025
9e9f614
use AppendGTIDInPlace
shlomi-noach Feb 20, 2025
476ccd5
ParseMysql56GTID when we know the GTID is singular. Use AppendGTIDInP…
shlomi-noach Feb 20, 2025
ab673ad
remove VtLogStats use
shlomi-noach Feb 20, 2025
c072e25
preallocate relay log buffer (up to some limit)
shlomi-noach Feb 20, 2025
bcfa0b7
further improvements:
shlomi-noach Feb 20, 2025
4287377
simplify Mysql56GTID.GTIDSet()
shlomi-noach Feb 23, 2025
428b465
simplify logic: remove use of ConsiderCommitWorkerEvent, cap batched …
shlomi-noach Feb 23, 2025
58f1c99
increment assignSequence before assigning
shlomi-noach Feb 24, 2025
a9f8b83
increase maxIdleWorkerDuration
shlomi-noach Feb 24, 2025
5a998ab
increment assignSequence sooner
shlomi-noach Mar 12, 2025
faf9cdc
more benchmark knobs: yes/no to throttling online-dll; choosing workl…
shlomi-noach Mar 12, 2025
38446fc
resolved conflict
shlomi-noach Mar 12, 2025
065afa7
fix endtoend cluster/vtctld reference
shlomi-noach Mar 12, 2025
740d9ee
INSERT IGNORE rather than REPLACE vreplication_worker_pos, so as to p…
shlomi-noach Mar 17, 2025
98768c4
use time.Format
shlomi-noach Mar 17, 2025
9c8bc00
only compute time.Now and vs.eventGTID.String() once, instead of per …
shlomi-noach Mar 17, 2025
e58d3d1
respect Skippable flag, do not attempt to skip when Skippable=false
shlomi-noach Mar 17, 2025
b0a79e9
producer fixes:
shlomi-noach Mar 17, 2025
5c8a6cf
workers block until dependent transaction is committed
shlomi-noach Mar 19, 2025
5ea998b
reduce logging
shlomi-noach Mar 20, 2025
fcad0ba
Merge branch 'main' into parallel-vplayer
shlomi-noach Mar 20, 2025
db740e0
Multiple producer/worker improvements:
shlomi-noach Mar 24, 2025
db7f2a7
configurable 'useBatchCommits' in parallel applier
shlomi-noach Apr 6, 2025
011aa69
Merge branch 'main' into parallel-vplayer
shlomi-noach Apr 23, 2025
af832a0
resolved conflicts
shlomi-noach Aug 25, 2025
9ec2b42
resolved conflicts
shlomi-noach Oct 19, 2025
ab8eaf5
Merge remote-tracking branch 'origin/main' into parallel-vplayer
mattlord Dec 11, 2025
99b3dae
Fix linter warning
mattlord Dec 12, 2025
40b0947
Update workflow
mattlord Dec 12, 2025
9c55185
Small changes
mattlord Dec 12, 2025
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
155 changes: 155 additions & 0 deletions .github/workflows/cluster_endtoend_onlineddl_vrepl_bench.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
# DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows"

name: Cluster (onlineddl_vrepl_bench)
on:
push:
branches:
- "main"
- "release-[0-9]+.[0-9]"
tags: '**'
pull_request:
branches: '**'
concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_vrepl_bench)')
cancel-in-progress: true

permissions: read-all

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

jobs:
build:
timeout-minutes: 60
name: Run endtoend tests on Cluster (onlineddl_vrepl_bench)
runs-on: oracle-vm-16cpu-64gb-x86-64

steps:
- name: Skip CI
run: |
if [[ "${{contains( github.event.pull_request.labels.*.name, 'Skip CI')}}" == "true" ]]; then
echo "skipping CI due to the 'Skip CI' label"
exit 1
fi

- name: Check out code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: 'false'

- name: Check for changes in relevant files
uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1
id: changes
with:
token: ''
filters: |
end_to_end:
- 'test/config.json'
- 'go/**/*.go'
- 'go/vt/sidecardb/**/*.sql'
- 'go/test/endtoend/onlineddl/vrepl_suite/**'
- 'test.go'
- 'Makefile'
- 'build.env'
- 'go.sum'
- 'go.mod'
- 'proto/*.proto'
- 'tools/**'
- 'config/**'
- 'bootstrap.sh'
- '.github/workflows/cluster_endtoend_onlineddl_vrepl_bench.yml'
- 'go/test/endtoend/onlineddl/vrepl_suite/testdata'

- name: Set up Go
if: steps.changes.outputs.end_to_end == 'true'
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version-file: go.mod

- name: Set up python
if: steps.changes.outputs.end_to_end == 'true'
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1

- name: Tune the OS
if: steps.changes.outputs.end_to_end == 'true'
uses: ./.github/actions/tune-os

- name: Setup MySQL
if: steps.changes.outputs.end_to_end == 'true'
uses: ./.github/actions/setup-mysql
with:
flavor: mysql-8.4

- name: Get dependencies
if: steps.changes.outputs.end_to_end == 'true'
timeout-minutes: 10
run: |

sudo apt-get -qq install -y mysql-shell

# Install everything else we need, and configure
sudo apt-get -qq install -y make unzip g++ etcd-client etcd-server curl git wget xz-utils libncurses6

sudo service etcd stop

go mod download

# install JUnit report formatter
go install github.com/vitessio/go-junit-report@99fa7f0daf16db969f54a49139a14471e633e6e8 # HEAD

- name: Setup launchable dependencies
if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main'
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" --no-commit-collection --source .

- name: Run cluster endtoend test
if: steps.changes.outputs.end_to_end == 'true'
timeout-minutes: 45
run: |
# We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file
# which musn't be more than 107 characters long.
export VTDATAROOT="/tmp/"
source build.env

set -exo pipefail

cat <<-EOF>>./config/mycnf/mysql84.cnf
binlog-transaction-compression=ON
EOF

cat <<-EOF>>./config/mycnf/mysql84.cnf
binlog-row-value-options=PARTIAL_JSON
EOF

# Some of these tests require specific locales to be installed.
# See https://github.com/cncf/automation/commit/49f2ad7a791a62ff7d038002bbb2b1f074eed5d5
# run the tests however you normally do, then produce a JUnit XML file
go run test.go -docker=false -follow -shard onlineddl_vrepl_bench | tee -a output.txt | go-junit-report -set-exit-code > report.xml

- name: Record test results in launchable if PR is not a draft
if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled()
run: |
# send recorded tests to launchable
launchable record tests --build "$GITHUB_RUN_ID" go-test . || true

- name: Print test output
if: steps.changes.outputs.end_to_end == 'true' && !cancelled()
run: |
# print test output
cat output.txt

- name: Test Summary
if: steps.changes.outputs.end_to_end == 'true' && !cancelled()
uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4
with:
paths: "report.xml"
show: "fail"
6 changes: 6 additions & 0 deletions config/mycnf/mysql8026.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,9 @@ super-read-only
# Replication parameters to ensure reparents are fast.
replica_net_timeout = 8


binlog_transaction_dependency_tracking=WRITESET
slave_preserve_commit_order=ON
slave_parallel_type=LOGICAL_CLOCK
transaction_write_set_extraction=XXHASH64

1 change: 1 addition & 0 deletions examples/common/scripts/vttablet-up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ vttablet \
--pid-file $VTDATAROOT/$tablet_dir/vttablet.pid \
--heartbeat-on-demand-duration=5s \
--pprof-http \
--vreplication_experimental_flags=15 \
> $VTDATAROOT/$tablet_dir/vttablet.out 2>&1 &

# Block waiting for the tablet to be listening
Expand Down
Loading
Loading