Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Slack sync 2019 01 30 #125

Merged
merged 179 commits into from
Jan 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
179 commits
Select commit Hold shift + click to select a range
8ea39c3
change ClusterAlias in _vt.local_metadata to be keyspace/shard instea…
deepthi Dec 4, 2018
6d20c51
Remove trailing whitespace
Dec 21, 2018
421e45a
Use recommended version combination
Dec 21, 2018
a33b3d6
Extract the connection com_query implementation into its own method
dweitzman Dec 22, 2018
f1397ed
Multi-statement support for the vtgate mysql protocol
dweitzman Dec 22, 2018
23f135e
Merge pull request #4486 from dweitzman/multi_stmt
sougou Dec 22, 2018
157ebf5
Added the ability to build without tests
jvaidya Dec 23, 2018
1de0558
require golang version 1.11+
Dec 24, 2018
dfc0bb9
Merge pull request #4489 from slanning/go1.11-required
sougou Dec 24, 2018
4060706
Merge pull request #4487 from jvaidya/build_tests_options
sougou Dec 24, 2018
6232bc3
Fix docs. Make sure that env.sh does not set VTTOP if already set.
jvaidya Dec 24, 2018
b90b3c0
Merge pull request #4490 from jvaidya/fix_docs
sougou Dec 24, 2018
a60a42d
build: fix broken build for other flavors
sougou Dec 31, 2018
6ecb6d3
docker: install wget into vttablet container
derekperkins Dec 31, 2018
92617b0
helm: orchestrator refresh/forget in preStop hook
derekperkins Dec 31, 2018
87c0f0c
helm: downtime orchestrator in preStop reparent
derekperkins Jan 1, 2019
d294ebd
Merge pull request #4493 from derekperkins/orc-reparent-api
dkhenry Jan 1, 2019
f22c9fc
Merge pull request #4492 from planetscale/ss-docker-fix
dkhenry Jan 1, 2019
1550955
helm: run orchestrator refresh before downtime end
derekperkins Jan 1, 2019
71a2b0c
helm: bump chart version to 1.0.4
derekperkins Jan 1, 2019
fea4e1d
fix a bootstrap.sh error
Jan 2, 2019
e4ba1a8
Merge pull request #4495 from slanning/build-or-dev-env-broken
sougou Jan 2, 2019
e0133e4
Regenerates protobuf files using protoc 3.6.1
rafael Jan 2, 2019
8ad75e1
Merge pull request #4494 from derekperkins/helm-1.0.4
sougou Jan 3, 2019
6cf46db
Merge pull request #4497 from tinyspeck/update-protobuf-generated-files
sougou Jan 3, 2019
f5868c6
vreplication: vstreamer Engine
sougou Dec 26, 2018
a609740
vreplication: streamer planbuilder
sougou Dec 28, 2018
ec4e808
vreplication: vstreamer, plan and filtering
sougou Dec 29, 2018
8cd1c5b
vreplication: tabletserver inits and other tweaks
sougou Dec 29, 2018
a0b9489
vreplication: got some basic tests working
sougou Dec 31, 2018
bd7fe99
vreplication: make a singleton srvtopo.Server
sougou Dec 31, 2018
7f1c7b5
vreplication: tests: statements and DDL add column
sougou Dec 31, 2018
7fd0c82
vreplication: MariaDB test tweaks and more tests
sougou Dec 31, 2018
b17b551
vreplication: more vstreamer tests
sougou Jan 1, 2019
1552117
vreplication: moved tests into vstreamer dir
sougou Jan 1, 2019
6b11903
vreplication: handle singleton and mariadb issues
sougou Jan 1, 2019
6ff51d3
vreplication: tests are done
sougou Jan 2, 2019
01aa233
vreplication: vstream final tweaks
sougou Jan 2, 2019
de9dd9c
Add group specification to mysql static auth for ACL usage
Santiclause Jan 3, 2019
5be6e2a
Add a StaticUserData test and update json parsing test
Santiclause Jan 3, 2019
3a04099
Fix MultiSplitDiff incorrectly logging "have already found differences"
dweitzman Jan 4, 2019
5147e9f
Don't freeze with no serving shards if reversing vreplication fails d…
dweitzman Dec 13, 2018
96e7c5d
Delete orphan SourceShard records for a failed master migration with …
dweitzman Jan 4, 2019
c5c2c02
Merge pull request #4449 from dweitzman/fix_reverse_failure
sougou Jan 4, 2019
230bf56
Gracefully re-create the vreplication table if it disappears
dweitzman Jan 4, 2019
ae79dd4
Merge pull request #4455 from dweitzman/always_create_vreplication_table
sougou Jan 4, 2019
be4235c
Merge pull request #4499 from Santiclause/wip-static-groups
sougou Jan 6, 2019
42f5c76
Merge pull request #4500 from dweitzman/fix_multi_split_error
sougou Jan 6, 2019
876b842
Check perceived tablet type before taking a backup
rafael Jan 8, 2019
6ccbb93
Remove influxdb as a push backend
dweitzman Jan 8, 2019
85253b8
helm: FailMasterPromotionIfSQLThreadNotUpToDate=tr
derekperkins Jan 8, 2019
6fec4da
Route "show tables from <keyspace>" to the named keyspace
dweitzman Jan 8, 2019
636b5a1
Merge pull request #4506 from derekperkins/orc-no-failover
dkhenry Jan 8, 2019
5cafa54
Merge pull request #4508 from tinyspeck/check-tablet-type-backup
sougou Jan 9, 2019
182a942
Merge pull request #4507 from dweitzman/show_tables_keyspace
sougou Jan 9, 2019
e92c392
planbuilder: support ‘on duplicate key’ for msgs
derekperkins Jan 9, 2019
28def54
exec_cases: add failing tests for msgs on dupe
derekperkins Jan 9, 2019
9ab9ecc
exec_cases: add passing messages OnDup test
derekperkins Jan 9, 2019
698aa37
Support tables that have columns named desc
rafael Jan 10, 2019
eae8f86
reload db-credentials-file upon SIGHUP
Jan 10, 2019
8bb1182
Makes sure the schema engine has started up before getting debug info…
mpawliszyn Jan 10, 2019
c171538
Skip ACL checks for dual pseudotable
Santiclause Jan 10, 2019
599854e
test the signal handler
Jan 11, 2019
bf5e4b1
tlstest_test: Go 1.12 / TLS 1.3 fix
alainjobart Jan 12, 2019
3d9c1c7
Merge pull request #4512 from derekperkins/messages-batch-update
sougou Jan 12, 2019
c9a7e8c
Merge pull request #4513 from tinyspeck/add-support-for-columns-named…
sougou Jan 12, 2019
f8bb8a0
Merge pull request #4515 from mpawliszyn/mikepaw.start-engine
sougou Jan 12, 2019
976eb3a
Merge pull request #4516 from Santiclause/ignore-dual-acl-check
sougou Jan 12, 2019
0e37f1f
vreplication: address review comments
sougou Jan 12, 2019
f9f74b3
helm: release 1.0.5
derekperkins Jan 12, 2019
f1f9cca
Merge pull request #4521 from nozzle/helm-1.0.5
sougou Jan 14, 2019
e9e9163
Merge pull request #4491 from planetscale/ss-vrepl
sougou Jan 14, 2019
b06cf39
Merge pull request #4520 from alainjobart/tls
alainjobart Jan 14, 2019
dc15447
Merge pull request #4463 from planetscale/ds-cluster-alias
sougou Jan 14, 2019
0b0b841
inline ok check; while-range instead of bare while
Jan 14, 2019
ddae5bb
Expose `glog.MaxSize` as `-log_rotate_max_size` flag
adsr Jan 14, 2019
789ab80
Merge pull request #4523 from adsr/log_rotate_size
sougou Jan 15, 2019
c1cd824
Merge pull request #4514 from HubSpot/dbconfig-reload
sougou Jan 15, 2019
47fcfa6
vtctl: run BackupShard on replica, rdonly or spare
derekperkins Jan 15, 2019
87a9adf
Use a truly random Destination for DestinationAnyShard
eeSeeGee Jan 14, 2019
e9e1ab5
Merge pull request #4524 from nozzle/backup-shard
sougou Jan 15, 2019
7bd3486
Revert "Support tables that have columns named desc"
rafael Jan 15, 2019
a9cf065
Adding in SQL commands to prepare an instance to join an existing shard
Jan 15, 2019
e86d27f
Merge pull request #4528 from planetscale/dk-fix-mariadb-init
sougou Jan 16, 2019
b776864
Merge pull request #4526 from tinyspeck/revert-4513-add-support-for-c…
sougou Jan 16, 2019
7c36faa
Adds a test to check regressions in parser
rafael Jan 15, 2019
ac24f91
vreplication: playerPlan initial cut
sougou Jan 6, 2019
1f0f55e
vreplication: vplayer WIP
sougou Jan 7, 2019
39e9748
vreplication: vplayer basic functionality done
sougou Jan 9, 2019
0fe2312
vreplication: refactored vstreamer test for reuse
sougou Jan 9, 2019
226aff4
vreplication: preliminary vplayer tests
sougou Jan 10, 2019
afa7baf
vreplication: more tweaks
sougou Jan 14, 2019
cf26d48
vreplication: relayLog functionality
sougou Jan 15, 2019
360d5cd
Merge pull request #4527 from tinyspeck/add-test-check-regressions-in…
sougou Jan 16, 2019
19480ef
Merge pull request #4522 from eeSeeGee/young.20190114.random_any_dest…
sougou Jan 17, 2019
8b56b33
vplayer: more features
sougou Jan 17, 2019
cff8cda
vplayer: more tests and a few bug fixes
sougou Jan 18, 2019
be97d69
Add capability create consistent transactions
systay Jan 18, 2019
4e8ff1a
Since STRICT_ALL_TABLES is a superset of STRICT_TRANS_TABLES, allow d…
mlauter Jan 18, 2019
69a2183
Merge pull request #4533 from systay/lock-tables2
sougou Jan 18, 2019
dbef792
Merge pull request #4534 from mlauter/strict-all-tables
sougou Jan 19, 2019
ed9216d
vplayer: ddl tests and some fixes
sougou Jan 19, 2019
4b6d22f
vplayer: fix tests and mariadb103 issues
sougou Jan 20, 2019
4126ddb
vplayer: test stopPos
sougou Jan 20, 2019
9a63e38
vplayer: improved state management
sougou Jan 20, 2019
519aa21
helm: update orchestrator from 3.0.13 to 3.0.14
derekperkins Jan 20, 2019
c9d727f
helm: run pmm-admin repair to fix server data loss
derekperkins Jan 20, 2019
5831222
helm: release 1.0.6
derekperkins Jan 20, 2019
c462dd8
Merge pull request #4536 from nozzle/helm-1.0.6
sougou Jan 21, 2019
2839244
vplayer: go with shorter idle timeouts
sougou Jan 21, 2019
8199e40
vplayer: more tests
sougou Jan 21, 2019
d7e5c3f
Make kmysql.sh work on Vitess on a single K8s node setup by Kubeadm.(
qdongxu Jan 21, 2019
a88142d
Merge pull request #4537 from qdongxu/kmysql_on_kubeadm
sougou Jan 21, 2019
c98ab1a
vplayer: more tests and timestamp fixes
sougou Jan 22, 2019
f19985e
Make MultiSplitDiff work with consistent snapshot
systay Jan 22, 2019
f9c0f31
vplayer: timezone fix and more tests
sougou Jan 22, 2019
8a96331
vplayer: tables with no pk and more tests
sougou Jan 23, 2019
349a564
Reduce the number of unit tests that require VTROOT by moving testdat…
dweitzman Jan 24, 2019
ade04fe
Change common unhandled packet error message to clarify origin
sjmudd Jan 24, 2019
4f5ae09
mysqlctl: add MyRocks dir/files to backups
derekperkins Jan 24, 2019
e4c0099
Merge pull request #4548 from sjmudd/unhandled_packet_logging
sougou Jan 25, 2019
a9cbb34
Merge pull request #4545 from dweitzman/testdata
sougou Jan 25, 2019
91c520a
Merge pull request #4539 from systay/consistent-multi-split-diff
sougou Jan 25, 2019
3bd115f
Merge pull request #4503 from dweitzman/remove_influx
sougou Jan 25, 2019
023f62e
Add a special plan type for impossible queries
eeSeeGee Jan 9, 2019
fdd5e9b
Adding a reset of the slave on blank restore
Jan 25, 2019
1117784
Make SplitClone work with consistent snapshot
systay Jan 22, 2019
1d8fb20
Close test resources
systay Jan 25, 2019
0eb3b4e
mysqlctl: add backup test for rockdb and sdi files
derekperkins Jan 25, 2019
3d91558
Wrong code comment
xichengliudui Jan 25, 2019
a4cf44b
Update doc
xichengliudui Jan 25, 2019
b92f377
Merge pull request #4549 from nozzle/backup-myrocks-dir
derekperkins Jan 25, 2019
c316730
docker: don't chown nonexistent /vt dir
derekperkins Jan 25, 2019
d566851
Merge pull request #4554 from vitessio/derekperkins-patch-2
derekperkins Jan 25, 2019
bfd3b42
Merge pull request #4484 from HubSpot/use-compatible-versions
sougou Jan 26, 2019
9f05436
Merge pull request #4552 from planetscale/dk-force-slave-reset-on-res…
sougou Jan 26, 2019
869543a
Merge pull request #4510 from eeSeeGee/young.20190209.impossible_plan
sougou Jan 26, 2019
c0dbf47
vplayer: PlayerPlan tests
sougou Jan 26, 2019
fab917f
vplayer: types test
sougou Jan 26, 2019
d74e120
vplayer: fix for binary column data type
sougou Jan 27, 2019
a7f0dca
vplayer: update only what has changed
sougou Jan 27, 2019
4b4da3a
Minor cleanups
systay Jan 28, 2019
97420cf
Merge remote-tracking branch 'upstream/master' into consistent-split-…
systay Jan 28, 2019
df60fec
parse TIMESTAMP{ADD,DIFF} functions
Jan 28, 2019
dbc94c0
go/mysql: remove excessive []byte(s) conversion
quasilyte Jan 28, 2019
28e7e55
Merge pull request #4519 from slanning/timestamp-funcs
sougou Jan 29, 2019
c00469e
Mkwe consistent snapshot the default
systay Jan 29, 2019
851889b
Merge pull request #4560 from xichengliudui/fix190129
sougou Jan 29, 2019
07ce41e
Merge pull request #4558 from Quasilyte/patch-1
sougou Jan 29, 2019
34b76c2
Merge pull request #4562 from xichengliudui/fix19012903
sougou Jan 29, 2019
86594dd
Merge pull request #4541 from systay/consistent-split-clone
sougou Jan 29, 2019
4a5d58e
Update comments in functions
xichengliudui Jan 29, 2019
a185df4
Update log
xichengliudui Jan 29, 2019
79a5b2d
Merge pull request #4564 from xichengliudui/fixloginfo
sougou Jan 29, 2019
f306a24
Merge pull request #4563 from xichengliudui/fix19012905
sougou Jan 29, 2019
76b1a6b
Update func
xichengliudui Jan 30, 2019
d1be759
Update func and md and txt
xichengliudui Jan 30, 2019
9ccdac9
Update FAQ.md
xichengliudui Jan 30, 2019
9dfff49
update pull request
xichengliudui Jan 30, 2019
2b6dda4
update pull request
xichengliudui Jan 30, 2019
a252f6a
Merge pull request #4567 from xichengliudui/updateFAQ.md
sougou Jan 30, 2019
4e8d21c
Merge pull request #4565 from xichengliudui/Updatefunc
sougou Jan 30, 2019
cf0b053
Merge pull request #4566 from xichengliudui/update-all-func-md-txt-file
sougou Jan 30, 2019
c68ed2d
Update the function name in the comment
xichengliudui Jan 30, 2019
f563cdb
Merge pull request #4570 from xichengliudui/updateannotation
sougou Jan 30, 2019
332bd41
Don't panic in binlogplayer if the vreplication table omits key range
dweitzman Jan 30, 2019
20d7100
update .go and .py files
xichengliudui Jan 30, 2019
69b0102
Merge pull request #4571 from dweitzman/fix_panic
sougou Jan 30, 2019
dee0fe3
vplayer: address review comments
sougou Jan 30, 2019
a74cdc1
Merge branch 'upstream-master' into slack-sync-vreplication-2019-01-29
rafael Jan 30, 2019
16284e3
Revert "change ClusterAlias in _vt.local_metadata to be keyspace/shar…
deepthi Jan 30, 2019
fd87a7e
fix comments in tests
deepthi Jan 31, 2019
1c69d83
Use a more specific "in use" message for the tx killer's rollback
dweitzman Jan 31, 2019
207b084
Merge pull request #4555 from planetscale/ss-vrepl
sougou Jan 31, 2019
1fe68aa
Merge pull request #4574 from planetscale/ds-cluster-alias
sougou Jan 31, 2019
c2d5cc3
Merge pull request #4575 from planetscale/ds-executor-test-doc
sougou Jan 31, 2019
331e3f2
Merge pull request #4576 from dweitzman/tx_killer_borrow_text
sougou Jan 31, 2019
5867ebe
Merge pull request #4577 from xichengliudui/fix190131
sougou Jan 31, 2019
4a1cdfc
Merge branch 'upstream-master' into slack-sync-2019-01-30
rafael Jan 31, 2019
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
124 changes: 74 additions & 50 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
# 3. Detection of installed MySQL and setting MYSQL_FLAVOR.
# 4. Installation of development related steps e.g. creating Git hooks.

BUILD_TESTS=${BUILD_TESTS:-1}

#
# 0. Initialization and helper methods.
Expand All @@ -45,25 +46,36 @@ function fail() {
[[ "$(dirname "$0")" = "." ]] || fail "bootstrap.sh must be run from its current directory"

go version &>/dev/null || fail "Go is not installed or is not on \$PATH"
[[ "$(go version 2>&1)" =~ go1\.[1-9][1-9] ]] || fail "Go is not version 1.11+"

# Set up the proper GOPATH for go get below.
source ./dev.env
if [ "$BUILD_TESTS" == 1 ] ; then
source ./dev.env
else
source ./build.env
fi

# Create main directories.
mkdir -p "$VTROOT/dist"
mkdir -p "$VTROOT/bin"
mkdir -p "$VTROOT/lib"
mkdir -p "$VTROOT/vthook"

# Set up required soft links.
# TODO(mberlin): Which of these can be deleted?
ln -snf "$VTTOP/config" "$VTROOT/config"
ln -snf "$VTTOP/data" "$VTROOT/data"
ln -snf "$VTTOP/py" "$VTROOT/py-vtdb"
ln -snf "$VTTOP/go/vt/zkctl/zksrv.sh" "$VTROOT/bin/zksrv.sh"
ln -snf "$VTTOP/test/vthook-test.sh" "$VTROOT/vthook/test.sh"
ln -snf "$VTTOP/test/vthook-test_backup_error" "$VTROOT/vthook/test_backup_error"
ln -snf "$VTTOP/test/vthook-test_backup_transform" "$VTROOT/vthook/test_backup_transform"
if [ "$BUILD_TESTS" == 1 ] ; then
# Set up required soft links.
# TODO(mberlin): Which of these can be deleted?
ln -snf "$VTTOP/config" "$VTROOT/config"
ln -snf "$VTTOP/data" "$VTROOT/data"
ln -snf "$VTTOP/py" "$VTROOT/py-vtdb"
ln -snf "$VTTOP/go/vt/zkctl/zksrv.sh" "$VTROOT/bin/zksrv.sh"
ln -snf "$VTTOP/test/vthook-test.sh" "$VTROOT/vthook/test.sh"
ln -snf "$VTTOP/test/vthook-test_backup_error" "$VTROOT/vthook/test_backup_error"
ln -snf "$VTTOP/test/vthook-test_backup_transform" "$VTROOT/vthook/test_backup_transform"
else
ln -snf "$VTTOP/config" "$VTROOT/config"
ln -snf "$VTTOP/data" "$VTROOT/data"
ln -snf "$VTTOP/go/vt/zkctl/zksrv.sh" "$VTROOT/bin/zksrv.sh"
fi

# install_dep is a helper function to generalize the download and installation of dependencies.
#
Expand Down Expand Up @@ -136,8 +148,10 @@ function install_grpc() {
grpcio_ver=$version
$PIP install --upgrade grpcio=="$grpcio_ver" grpcio-tools=="$grpcio_ver"
}
install_dep "gRPC" "1.16.0" "$VTROOT/dist/grpc" install_grpc

if [ "$BUILD_TESTS" == 1 ] ; then
install_dep "gRPC" "1.16.0" "$VTROOT/dist/grpc" install_grpc
fi

# Install protoc.
function install_protoc() {
Expand Down Expand Up @@ -225,8 +239,9 @@ function install_pymock() {
popd >/dev/null
}
pymock_version=1.0.1
install_dep "py-mock" "$pymock_version" "$VTROOT/dist/py-mock-$pymock_version" install_pymock

if [ "$BUILD_TESTS" == 1 ] ; then
install_dep "py-mock" "$pymock_version" "$VTROOT/dist/py-mock-$pymock_version" install_pymock
fi

# Download Selenium (necessary to run test/vtctld_web_test.py).
function install_selenium() {
Expand All @@ -239,7 +254,9 @@ function install_selenium() {
# instead of go/dist/selenium/lib/python3.5/site-packages and then can't find module 'pip._vendor.requests'
PYTHONPATH='' $PIP install selenium
}
install_dep "Selenium" "latest" "$VTROOT/dist/selenium" install_selenium
if [ "$BUILD_TESTS" == 1 ] ; then
install_dep "Selenium" "latest" "$VTROOT/dist/selenium" install_selenium
fi


# Download chromedriver (necessary to run test/vtctld_web_test.py).
Expand All @@ -251,7 +268,9 @@ function install_chromedriver() {
unzip -o -q chromedriver_linux64.zip -d "$dist"
rm chromedriver_linux64.zip
}
install_dep "chromedriver" "2.44" "$VTROOT/dist/chromedriver" install_chromedriver
if [ "$BUILD_TESTS" == 1 ] ; then
install_dep "chromedriver" "2.44" "$VTROOT/dist/chromedriver" install_chromedriver
fi


#
Expand Down Expand Up @@ -300,47 +319,52 @@ govendor sync || fail "Failed to download/update dependencies with govendor. Ple


# find mysql and prepare to use libmysqlclient
if [ -z "$MYSQL_FLAVOR" ]; then
export MYSQL_FLAVOR=MySQL56
echo "MYSQL_FLAVOR environment variable not set. Using default: $MYSQL_FLAVOR"
fi
case "$MYSQL_FLAVOR" in
"MySQL56")
myversion="$("$VT_MYSQL_ROOT/bin/mysql" --version)"
[[ "$myversion" =~ Distrib\ 5\.[67] || "$myversion" =~ Ver\ 8\. ]] || fail "Couldn't find MySQL 5.6+ in $VT_MYSQL_ROOT. Set VT_MYSQL_ROOT to override search location."
echo "Found MySQL 5.6+ installation in $VT_MYSQL_ROOT."
;;

"MariaDB")
myversion="$("$VT_MYSQL_ROOT/bin/mysql" --version)"
[[ "$myversion" =~ MariaDB ]] || fail "Couldn't find MariaDB in $VT_MYSQL_ROOT. Set VT_MYSQL_ROOT to override search location."
echo "Found MariaDB installation in $VT_MYSQL_ROOT."
;;

*)
fail "Unsupported MYSQL_FLAVOR $MYSQL_FLAVOR"
;;

esac

# save the flavor that was used in bootstrap, so it can be restored
# every time dev.env is sourced.
echo "$MYSQL_FLAVOR" > "$VTROOT/dist/MYSQL_FLAVOR"
if [ "$BUILD_TESTS" == 1 ] ; then
if [ -z "$MYSQL_FLAVOR" ]; then
export MYSQL_FLAVOR=MySQL56
echo "MYSQL_FLAVOR environment variable not set. Using default: $MYSQL_FLAVOR"
fi
case "$MYSQL_FLAVOR" in
"MySQL56")
myversion="$("$VT_MYSQL_ROOT/bin/mysql" --version)"
[[ "$myversion" =~ Distrib\ 5\.[67] || "$myversion" =~ Ver\ 8\. ]] || fail "Couldn't find MySQL 5.6+ in $VT_MYSQL_ROOT. Set VT_MYSQL_ROOT to override search location."
echo "Found MySQL 5.6+ installation in $VT_MYSQL_ROOT."
;;

"MariaDB")
myversion="$("$VT_MYSQL_ROOT/bin/mysql" --version)"
[[ "$myversion" =~ MariaDB ]] || fail "Couldn't find MariaDB in $VT_MYSQL_ROOT. Set VT_MYSQL_ROOT to override search location."
echo "Found MariaDB installation in $VT_MYSQL_ROOT."
;;

*)
fail "Unsupported MYSQL_FLAVOR $MYSQL_FLAVOR"
;;

esac
# save the flavor that was used in bootstrap, so it can be restored
# every time dev.env is sourced.
echo "$MYSQL_FLAVOR" > "$VTROOT/dist/MYSQL_FLAVOR"
fi

#
# 4. Installation of development related steps e.g. creating Git hooks.
#


# Create the Git hooks.
echo "creating git hooks"
mkdir -p "$VTTOP/.git/hooks"
ln -sf "$VTTOP/misc/git/pre-commit" "$VTTOP/.git/hooks/pre-commit"
ln -sf "$VTTOP/misc/git/prepare-commit-msg.bugnumber" "$VTTOP/.git/hooks/prepare-commit-msg"
ln -sf "$VTTOP/misc/git/commit-msg" "$VTTOP/.git/hooks/commit-msg"
(cd "$VTTOP" && git config core.hooksPath "$VTTOP/.git/hooks")
if [ "$BUILD_TESTS" == 1 ] ; then
# Create the Git hooks.
echo "creating git hooks"
mkdir -p "$VTTOP/.git/hooks"
ln -sf "$VTTOP/misc/git/pre-commit" "$VTTOP/.git/hooks/pre-commit"
ln -sf "$VTTOP/misc/git/prepare-commit-msg.bugnumber" "$VTTOP/.git/hooks/prepare-commit-msg"
ln -sf "$VTTOP/misc/git/commit-msg" "$VTTOP/.git/hooks/commit-msg"
(cd "$VTTOP" && git config core.hooksPath "$VTTOP/.git/hooks")
echo
echo "bootstrap finished - run 'source dev.env' in your shell before building."
else
echo
echo "bootstrap finished - run 'source build.env' in your shell before building."
fi


echo
echo "bootstrap finished - run 'source dev.env' in your shell before building."
39 changes: 39 additions & 0 deletions build.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# No shebang line as this script is sourced from an external shell.

# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Plese ensure dev.env is written in a way which is POSIX (bourne)
# shell compatible.
# - Some build systems like rpm require the different scriptlets used
# to build a package to be run under a POSIX shell so non-POSIX
# syntax will break that as dev.env will not be sourced by bash..

# Import prepend_path function.
dir="$(dirname "${BASH_SOURCE[0]}")"
# shellcheck source=tools/shell_functions.inc
if ! source "${dir}/tools/shell_functions.inc"; then
echo "failed to load tools/shell_functions.inc"
return 1
fi

VTTOP=$(pwd)
export VTTOP
VTROOT="${VTROOT:-${VTTOP/\/src\/vitess.io\/vitess/}}"
export VTROOT
# VTTOP sanity check
if [[ "$VTTOP" == "${VTTOP/\/src\/vitess.io\/vitess/}" ]]; then
echo "WARNING: VTTOP($VTTOP) does not contain src/vitess.io/vitess"
fi

2 changes: 2 additions & 0 deletions config/init_db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,5 @@ GRANT SELECT

FLUSH PRIVILEGES;

RESET SLAVE ALL;
RESET MASTER;
16 changes: 1 addition & 15 deletions dev.env
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,8 @@
# to build a package to be run under a POSIX shell so non-POSIX
# syntax will break that as dev.env will not be sourced by bash..

# Import prepend_path function.
dir="$(dirname "${BASH_SOURCE[0]}")"
# shellcheck source=tools/shell_functions.inc
if ! source "${dir}/tools/shell_functions.inc"; then
echo "failed to load tools/shell_functions.inc"
return 1
fi
source ./build.env

VTTOP=$(pwd)
export VTTOP
VTROOT="${VTROOT:-${VTTOP/\/src\/vitess.io\/vitess/}}"
export VTROOT
# VTTOP sanity check
if [[ "$VTTOP" == "${VTTOP/\/src\/vitess.io\/vitess/}" ]]; then
echo "WARNING: VTTOP($VTTOP) does not contain src/vitess.io/vitess"
fi
export GOTOP=$VTTOP/go
export PYTOP=$VTTOP/py

Expand Down
4 changes: 2 additions & 2 deletions doc/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ If no tablet type was specified, then VTGate chooses its default, which can be o

Vitess supports different modes. In OLTP mode, the result size is typically limited to a preset number (10,000 rows by default). This limit can be adjusted based on your needs.

However, OLAP mode has no limit to the number of rows returned. In order to change to this mode, you may issue the following command command before executing your query:
However, OLAP mode has no limit to the number of rows returned. In order to change to this mode, you may issue the following command before executing your query:

```
set workload='olap'
Expand All @@ -32,7 +32,7 @@ The general convention is to send OLTP queries to `REPLICA` tablet types, and OL

## Is there a list of supported/unsupported queries?

The list of unsupported constructs is currently in the form of test cases contained in this [test file](https://github.com/vitessio/vitess/blob/master/data/test/vtgate/unsupported_cases.txt). However, contrary to the test cases, there is limited support for SET, DDL and DBA constructs. This will be documented soon.
The list of unsupported constructs is currently in the form of test cases contained in this [test file](https://github.com/vitessio/vitess/blob/master/go/vt/vtgate/planbuilder/testdata/unsupported_cases.txt). However, contrary to the test cases, there is limited support for SET, DDL and DBA constructs. This will be documented soon.


## If I have a log of all queries from my app. Is there a way I can try them against vitess to see how they’ll work?
Expand Down
2 changes: 1 addition & 1 deletion doc/HorizontalReshardingWorkflowGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ on the clicked button. The approval buttons are cleared after the phase has
finished. The next phase will only starts if its previous phase has finished
successfully.

If the workflow is restored from a checkpoint, you will still see the the
If the workflow is restored from a checkpoint, you will still see the
approval button with approved message when there are running tasks under this
approval. But you don't need to approve the same tasks again for a restarted
workflow.
Expand Down
8 changes: 4 additions & 4 deletions doc/Monitoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ Scraping Vitess variables is a good way to integrate Vitess into an existing mon

Vitess also includes support for push-based metrics systems via plug-ins. Each Vitess component would need to be run with the `--emit_stats` flag.

By default, the stats_emit_period is 60s, so each component will push stats to the the selected backend every minute. This is configurable via the `--stats_emit_period` flag.
By default, the stats_emit_period is 60s, so each component will push stats to the selected backend every minute. This is configurable via the `--stats_emit_period` flag.

Vitess has preliminary plug-ins to support InfluxDB and OpenTSDB as push-based metrics backends. However, there is very limited support at this time, as InfluxDB itself is going through various API breaking changes.
Vitess has preliminary plug-ins to support OpenTSDB as a push-based metrics backend.

It should be fairly straightforward to write your own plug-in, if you want to support a different backend. The plug-in package simply needs to implement the `PushBackend` interface of the `stats` package. For an example, you can see the [InfluxDB plugin](https://github.com/vitessio/vitess/blob/master/go/stats/influxdbbackend/influxdb_backend.go).
It should be fairly straightforward to write your own plug-in, if you want to support a different backend. The plug-in package simply needs to implement the `PushBackend` interface of the `stats` package. For an example, you can see the [OpenTSDB plugin](https://github.com/vitessio/vitess/blob/master/go/stats/opentsdb/opentsdb.go).

Once you’ve written the backend plug-in, you also need to register the plug-in from within all the relevant Vitess binaries. An example of how to do this can be seen in [this pull request](https://github.com/vitessio/vitess/pull/469).

Expand All @@ -36,7 +36,7 @@ Connecting Vitess to a push-based metrics system can be useful if you’re alrea

## Monitoring with Kubernetes

The existing methods for integrating metrics are not supported in a Kubernetes environment by the Vitess team yet, but are on the roadmap for the future. However, it should be possible to get the InfluxDB backend working with Kubernetes, similar to how [Heapster for Kubernetes works](https://github.com/GoogleCloudPlatform/kubernetes/tree/master/cluster/addons/cluster-monitoring).
The existing methods for integrating metrics are not supported in a Kubernetes environment by the Vitess team yet, but are on the roadmap for the future. However, it should be possible to get the Prometheus backend working with Kubernetes, similar to how [Heapster for Kubernetes works](https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/prometheus).

In the meantime, if you run into issues or have questions, please post on our [forum](https://groups.google.com/forum/#!forum/vitess).

Expand Down
2 changes: 1 addition & 1 deletion doc/ScalingMySQL.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Setting up these components directly -- for example, writing your own topology s
* *Recommended*. Vitess has basic support for identifying or changing a master, but it doesn't aim to fully address this feature. As such, we recommend using another program, like [Orchestrator](https://github.com/github/orchestrator), to monitor the health of your servers and to change your master database when necessary. (In a sharded database, each shard has a master.)


* *Recommended*. You should have a way to monitor your database topology and set up alerts as needed. Vitess components facilitate this monitoring by exporting a lot of runtime variables, like QPS over the last few minutes, error rates, and query latency. The variables are exported in JSON format, and Vitess also supports an InfluxDB plug-in.
* *Recommended*. You should have a way to monitor your database topology and set up alerts as needed. Vitess components facilitate this monitoring by exporting a lot of runtime variables, like QPS over the last few minutes, error rates, and query latency. The variables are exported in JSON format, and Vitess also supports a Prometheus plug-in.


* *Optional*. Using the Kubernetes scripts as a base, you could run Vitess components with other configuration management systems (like Puppet) or frameworks (like Mesos or AWS images).
Expand Down
2 changes: 1 addition & 1 deletion doc/SchemaManagement.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ ValidateSchemaShard user/0

The <code>[ValidateSchemaKeyspace]({% link reference/vtctl.md %}#validateschemakeyspace)</code>
command confirms that all of the tablets in a given keyspace have
the the same schema as the master tablet on shard <code>0</code>
the same schema as the master tablet on shard <code>0</code>
in that keyspace. Thus, whereas the <code>ValidateSchemaShard</code>
command confirms the consistency of the schema on tablets within a shard
for a given keyspace, <code>ValidateSchemaKeyspace</code> confirms the
Expand Down
2 changes: 1 addition & 1 deletion doc/ServerConfiguration.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ This rule is not strictly enforced. You are allowed to add these things, but at

Similar guidelines should be used when deciding to bypass Vitess to send statements directly to MySQL.

Vitess also requires you to turn on STRICT_TRANS_TABLES mode. Otherwise, it cannot accurately predict what will be written to the database.
Vitess also requires you to turn on STRICT_TRANS_TABLES or STRICT_ALL_TABLES mode. Otherwise, it cannot accurately predict what will be written to the database.

It’s safe to apply backward compatible DDLs directly to MySQL. VTTablets can be configured to periodically check the schema for changes.

Expand Down
2 changes: 1 addition & 1 deletion doc/Upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This document highlights things to look after when upgrading a Vitess production installation to a newer Vitess release.

Generally speaking, upgrading Vitess is a safe and and easy process because it is explicitly designed for it. This is because in YouTube we follow the practice of releasing new versions often (usually from the tip of the Git master branch).
Generally speaking, upgrading Vitess is a safe and easy process because it is explicitly designed for it. This is because in YouTube we follow the practice of releasing new versions often (usually from the tip of the Git master branch).

## Compatibility

Expand Down
4 changes: 2 additions & 2 deletions doc/V3HighLevelDesign.md
Original file line number Diff line number Diff line change
Expand Up @@ -1311,7 +1311,7 @@ When two nodes are grouped, the current join condition becomes the root of the n
* If it’s a JOIN, the new property is the more restrictive of the two nodes. So, if one of them is a Route, then the new node is also a Route.
* For a LEFT JOIN, the new property is the same as the LHS node.

If the grouping conditions are not met, then the node remains a join node. In this case, we have to see if the ON clause conditions can be pushed down into the left and/or right nodes. By the fact that the current join is split into two, the ON clause cannot be be pushed as is. Instead, we use associativity rules to our benefit and merge the ON clause conditions into the WHERE clauses of the underlying nodes. The rules are the same as the ones described for a normal WHERE clause.
If the grouping conditions are not met, then the node remains a join node. In this case, we have to see if the ON clause conditions can be pushed down into the left and/or right nodes. By the fact that the current join is split into two, the ON clause cannot be pushed as is. Instead, we use associativity rules to our benefit and merge the ON clause conditions into the WHERE clauses of the underlying nodes. The rules are the same as the ones described for a normal WHERE clause.

But left joins are slightly different, because the join condition is applied *to the RHS only*. Also, the condition cannot be further pushed into other nested left joins, because they will change the meaning of the statement. For example:

Expand Down Expand Up @@ -1491,7 +1491,7 @@ If a, b and c where in different groups, the output would be:
a b where (b.id=a.id) and (cond1(a.col, b.col))
```

The cond2 expression gets pushed into the the where clause for table ‘c’ because it’s the right-most group that’s referenced by the condition. External references will be changed to appropriate bind variables by the rewiring phase.
The cond2 expression gets pushed into the where clause for table ‘c’ because it’s the right-most group that’s referenced by the condition. External references will be changed to appropriate bind variables by the rewiring phase.

*Once VTGate acquires the ability to perform its own filters, should we stop pushing these conditions into the dependent queries and do it ourselves instead? The answer will usually be no. You almost always want to push down filters. This is because it will let the underlying database scan fewer rows, or choose better indexes. The more restrictive the query is, the better.*

Expand Down
Loading