Jon Tirsen
2299f941f0
Don't cache Zookeeper DNS
...
Make sure we re-resolve the DNS name every time we reconnect to a
server. In environments where DNS changes often such as Kubernetes we
can't cache the IP address.
Signed-off-by: Jon Tirsen <jontirsen@squareup.com>
2019-09-04 09:30:29 +10:00
Anthony Yeh
45fb488af4
vtbackup: Stop slave before trying to change master address. ( #5153 )
...
Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
2019-09-03 14:57:38 -07:00
Andres Taylor
d5860b312c
Handle more situations with empty results and no grouping keys
...
Fixes #5148
Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-09-02 04:23:42 +02:00
Sugu Sougoumarane
40af468221
vreplication: address review comments
...
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-08-30 16:00:00 -07:00
Rasika Kale
1141f5ae4b
Deleted extra comments and tests in arithmetic.go and arithmetic_test.go
...
Signed-off-by: Rasika Kale <rasika@planetscale.com>
2019-08-30 14:54:49 -07:00
Rasika Kale
bbb4f977c8
Merge remote-tracking branch 'origin/master' into rk-newminus
...
Signed-off-by: Rasika Kale <rasika@planetscale.com>
2019-08-30 14:07:20 -07:00
Rasika Kale
0a1a9afe48
Fixed arithmetic.go and arithmetic_test.go through comments via github
...
- Added intMinusUintWithError() in arithmetic.go
- Fixed error checking in arithmetic.go for intMinusIntWithError()
Signed-off-by: Rasika Kale <rasika@planetscale.com>
2019-08-30 11:22:47 -07:00
Sugu Sougoumarane
74ae4e2806
Merge pull request #5141 from kalfonso/kalfonso.190828-later-vschema-keyspace
...
Execute "ALTER VSCHEMA" statements without specifying keyspace in the…
2019-08-29 20:35:45 -07:00
Sugu Sougoumarane
7d77f7d8ed
Merge pull request #5139 from tinyspeck/vtexplain-support-select-distinct
...
vtexplain support select distinct and other expressions
2019-08-29 19:18:03 -07:00
Sugu Sougoumarane
3ce4e0584d
Merge pull request #5149 from adsr/imm_handshake_err
...
Handle case where mysqld replies to Initial Handshake Packet with an ERR packet
2019-08-29 19:16:43 -07:00
Sugu Sougoumarane
f2ff0ae813
Merge pull request #5147 from planetscale/vtbackup-init
...
vtbackup: Make initial backup idempotent again.
2019-08-29 19:12:45 -07:00
Karel Alfonso Sague
fc1ad423ba
Execute "ALTER VSCHEMA" statements without specifying keyspace in the target connection.
...
If the keyspace is not present in the target string, it will be derived in this case from the vindex and table qualifiers in the vschema sql statements
Signed-off-by: Karel Alfonso Sague <kalfonso@squareup.com>
2019-08-30 10:33:11 +10:00
Adam Saponara
7504082368
Handle case where mysqld replies to Initial Handshake Packet with an ERR packet.
...
From mysql docs:
```
It starts with the client connect()ing to the server which may send a
ERR packet and finish the handshake or send a Initial Handshake
Packet...
```
`sql_state` fields are skipped because they are not set according to docs.
```
Note
In case the server sent a ERR packet as first packet it will happen
before the client and server negotiated any capabilities. Therefore
the ERR packet will not contain the SQL-state.
```
Signed-off-by: Adam Saponara <as@php.net>
2019-08-29 18:35:05 -04:00
Adam Saponara
880072cc8f
Prioritize executable comment in `sqlparser.Preview`
...
Signed-off-by: Adam Saponara <as@php.net>
2019-08-29 18:03:10 -04:00
Anthony Yeh
3a05a41b9f
vtbackup: Make initial backup idempotent again.
...
The check for a complete backup already existing was supposed to make
the initial backup idempotent, such that running it after an initial
backup already exists will simply do nothing and return success.
However, that property was broken when I added the check for serving
tablets above the check for a complete backup. I should have kept the
check for a complete backup first, because if there's already a complete
backup and we're doing nothing, then it's fine that some tablets may
already be serving.
Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
2019-08-29 10:11:20 -07:00
Adam Saponara
7c526e867a
Fix bug in `sqlparser.Preview`
...
Signed-off-by: Adam Saponara <as@php.net>
2019-08-29 12:04:00 -04:00
Sugu Sougoumarane
92095f1ba4
Merge pull request #5120 from HubSpot/vtgate-query-plans-endpoint-json
...
make vtgate query_plans endpoint return json; also fix comment typos
2019-08-29 08:24:04 -07:00
Sugu Sougoumarane
f6a612ad0b
Merge pull request #5143 from msolters/orc-basic-auth
...
Orc basic auth with vttablet flags
2019-08-29 08:15:38 -07:00
Karel Alfonso Sague
54d3a68403
Delete vitess metadata by setting empty key
...
Signed-off-by: Karel Alfonso Sague <kalfonso@squareup.com>
2019-08-29 16:24:42 +10:00
Mark Solters
cfbc7c9269
Orc basic auth with vttablet flags
...
Signed-off-by: Mark Solters <msolters@gmail.com>
2019-08-28 12:09:49 -04:00
Jon Tirsen
ad6099c8cb
Merge pull request #5103 from kalfonso/kalfonso.190814-set-vitess-metadata
...
Allow setting key/value in a metadata stored in the topology
2019-08-28 15:53:53 +10:00
Rasika Kale
829f3d3891
Fixed error print statements
...
Signed-off-by: Rasika Kale <rasika@planetscale.com>
2019-08-27 12:53:23 -07:00
Rasika Kale
2141b6338c
Fixed comment spacing and cleaned up code
...
Signed-off-by: Rasika Kale <rasika@planetscale.com>
2019-08-27 12:50:45 -07:00
Rasika Kale
6ab4c17bd9
Fixed spacing between // and comment
...
Signed-off-by: Rasika Kale <rasika@planetscale.com>
2019-08-27 11:29:23 -07:00
Rasika Kale
2c30eb41d0
Fixed code coverage in arithmetic.go
...
- Added more tests in arithmetic_test.go to fix code coverage
- Added error checking into arithmetic.go
- Implemented function floatMinusAny() for subtraction expression
Signed-off-by: Rasika Kale <rasika@planetscale.com>
2019-08-27 11:08:25 -07:00
Michael Demmer
f3ba59e686
make union all work for three or more statements
...
Signed-off-by: Michael Demmer <mdemmer@slack-corp.com>
2019-08-27 10:27:08 -07:00
Michael Demmer
8de216c803
add vtexplain support for union statements
...
Signed-off-by: Michael Demmer <mdemmer@slack-corp.com>
2019-08-27 10:24:28 -07:00
Jon Tirsen
dbdae965b3
Merge pull request #5136 from tirsen/jontirsen/2019-08-26/fix-use-for-mysql-with-dbname
...
Only override session.TargetString if it has not been set
2019-08-27 14:36:49 +10:00
Michael Demmer
d570b99a14
support more expression types in vtexplain
...
Rework the vtexplain simulated mysql to handle more expression types
when calculating fake column results based on inferences off the select
expression.
Also change the engine so that it logs an error instead of failing
outright, since the column values aren't always needed for it to
effectively simulate a query.
Signed-off-by: Michael Demmer <mdemmer@slack-corp.com>
2019-08-26 20:55:01 -07:00
Jon Tirsen
6a936d2844
Test to prove we're using the target for routing
...
Signed-off-by: Jon Tirsen <jontirsen@squareup.com>
2019-08-27 09:44:35 +10:00
Rasika Kale
9e4ea01cca
sqltypes: Subtract functionality
...
Signed-off-by: Rasika Kale <rasika@planetscale.com>
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-08-26 16:34:30 -07:00
Sugu Sougoumarane
91ad492a00
Merge pull request #5129 from planetscale/ds-bkup-hchk
...
healthcheck after backup should be run only for offline backups
2019-08-26 15:29:50 -07:00
Jon Tirsen
ad420aa1e2
Only override session.TargetString if it has not been set
...
Signed-off-by: Jon Tirsen <jontirsen@squareup.com>
2019-08-27 07:53:50 +10:00
Sugu Sougoumarane
335545926d
Merge pull request #5072 from planetscale/rk-add-expression
...
Addition expression implementation
2019-08-26 12:45:44 -07:00
Rasika Kale
c697d32eda
- Added fixes from github to ensure code coverage
...
- Deleted Subtract() and Multiply() and other functions not related to Add()
Signed-off-by: Rasika Kale <rasika@planetscale.com>
2019-08-26 12:10:33 -07:00
Karel Alfonso Sague
453d54b4c1
Allow setting key/value metadata stored in the topology
...
Signed-off-by: Karel Alfonso Sague <kalfonso@squareup.com>
2019-08-27 00:26:32 +10:00
Sugu Sougoumarane
6467c98549
Merge pull request #4996 from planetscale/ss-multi-lookup
...
v3: support overlapping multi-column vindexes
2019-08-24 12:27:45 -07:00
Rasika Kale
d030531eb7
- Fixed error in TestAdd()
...
Signed-off-by: Rasika Kale <rasika@planetscale.com>
2019-08-23 15:26:31 -07:00
Rasika Kale
25ed943113
- Changed default return value in newNumeric() from Float64 to Int64
...
Signed-off-by: Rasika Kale <rasika@planetscale.com>
2019-08-23 14:42:44 -07:00
Sugu Sougoumarane
c5a3bcf38a
vreplication: improved rowstreamer
...
For composite primary keys, mysql comes up with a full table scan
for conditions like (pk1,pk2) > (1, 2).
This change rewrites that condition to:
(pk1 = 1 and pk2 > 2) or (pk1 > 1)
Also removed the autocommit=0. It's not material to set that for
obtaining read locks.
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-08-23 12:29:16 -07:00
deepthi
0c48deece6
check that actionMutex is locked before running healthcheck
...
Signed-off-by: deepthi <deepthi@planetscale.com>
2019-08-23 11:37:26 -07:00
Sugu Sougoumarane
e9ce17599c
Merge pull request #5121 from mpawliszyn/mikepaw.fix-sum-count
...
Empty results should return a count of 0 but a sum of null.
2019-08-23 10:31:41 -07:00
deepthi
d221b9cf4b
healthcheck after backup should be run only for offline backups
...
Signed-off-by: deepthi <deepthi@planetscale.com>
2019-08-23 10:28:17 -07:00
Rasika Kale
8a009d55d2
- Fixed code from comments given by systay in arithmetic.go
...
Signed-off-by: Rasika Kale <rasika@planetscale.com>
2019-08-23 10:18:57 -07:00
Michael Pawliszyn
e94f297bc6
Empty results should return a count of 0 but a sum of null.
...
Signed-off-by: Michael Pawliszyn <mikepaw@squareup.com>
2019-08-23 10:16:36 -04:00
hwdef
51ba11f52f
fix spelling mistake
...
Signed-off-by: hwdef <hwdef97@gmail.com>
2019-08-23 13:33:42 +08:00
Deepthi Sigireddi
98a735dbcc
Merge pull request #5111 from planetscale/ss-vrepl-work
...
routing rules: handle corner case in delete
2019-08-22 16:46:50 -07:00
Rasika Kale
c23f0d35fa
- Imported "reflect" in ordered_aggregate_test.go
...
Signed-off-by: Rasika Kale <rasika@planetscale.com>
2019-08-22 16:22:26 -07:00
Rasika Kale
5dbc3169b2
Merge remote-tracking branch 'origin/master' into rk-add-expression
...
Signed-off-by: Rasika Kale <rasika@planetscale.com>
2019-08-22 15:44:26 -07:00
Rasika Kale
b9c1a151c3
- Fixed TestToFloat64() and TestNewNumeric() in arithmetic_test.go to avoid runtime errors
...
Signed-off-by: Rasika Kale <rasika@planetscale.com>
2019-08-22 14:43:11 -07:00
Rasika Kale
1b5e37db66
- Included fixes for code by Sugu and Morgan
...
- Fixed TestOrderedAggregateMergeFail in ordered_aggregate_test.go to return proper value for expressions such as "b + 1"
Signed-off-by: Rasika Kale <rasika@planetscale.com>
2019-08-22 13:32:46 -07:00
Sugu Sougoumarane
b5207f0d59
Merge pull request #5124 from planetscale/tinyspeck-remove-non-standard-keywords-from-show
...
Remove non standard keywords from show
2019-08-21 15:46:46 -07:00
Saif Alharthi
81cd378a85
Fix Merge conflicts
...
Signed-off-by: Saif Alharthi <saif@saifalharthi.me>
2019-08-21 14:06:19 -07:00
Sugu Sougoumarane
a3b5da7e22
Merge pull request #5114 from planetscale/ss-vrepl-fix-copy
...
vreplication: bug: make row streaming more robust
2019-08-21 13:35:41 -07:00
Alex Charis
9e58664e5d
make vtgate query_plans endpoint return json; also fix comment typos
...
Signed-off-by: Alex Charis <acharis@hubspot.com>
2019-08-21 10:41:02 -04:00
Andres Taylor
dd2e2bc7e4
Added test to make sure comments are handled correctly
...
Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-08-21 15:29:08 +02:00
Andres Taylor
fd131c8540
Made span context extraction testable and added tests
...
Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-08-21 13:26:31 +02:00
Andres Taylor
930f6faa35
Add functionality to extract spans from strings
...
Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-08-21 13:26:31 +02:00
Andres Taylor
8d174a8101
Minor clean ups
...
Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-08-21 13:26:31 +02:00
Andres Taylor
b845c016ee
Make it possible to serialize span contexts over strings
...
Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-08-21 13:26:31 +02:00
Rasika Kale
cf5f4b9bd3
- Pushing current changes to ordered_aggregate_test.go and arithmetic.go
...
Signed-off-by: Rasika Kale <rasika@planetscale.com>
2019-08-20 15:26:29 -07:00
Sugu Sougoumarane
08650b54c6
Merge pull request #4936 from planetscale/tj-vtclient
...
vtclient: Add sequential id generation and throttling
2019-08-20 13:24:19 -07:00
Sugu Sougoumarane
613b4cef60
vreplication: bug: make row streaming more robust
...
During production testing, we found that there are possibilities
that a table lock never gets released when row streaming is requested.
We most likely suspect that a grpc send hangs, which keeps the table
locked, when eventually causes replication to stall and subsequent
row streaming requests to hang.
This change refactors the code to make sure that we unlock a table
as soon as streaming has started. The previous code unlocked the table
only after sending the field info.
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-08-19 12:49:52 -07:00
Sugu Sougoumarane
6684246ba6
Merge pull request #5110 from AllenZMC/patch-2
...
fix mis-spelling in txlogz.go
2019-08-19 12:16:21 -07:00
Guangming Wang
6ed476e71e
cleanup: engine/insert.go comment fix typo
...
Signed-off-by: Guangming Wang <guangming.wang@daocloud.io>
2019-08-19 21:46:54 +08:00
Sugu Sougoumarane
30d6e0d0a3
routing rules: handle corner case in delete
...
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-08-18 20:31:54 -07:00
Toliver Jue
ad339533f3
fix race condition
...
Signed-off-by: Toliver Jue <toliver@planetscale.com>
2019-08-19 12:23:18 +09:00
AllenZMC
b78c2a7f6d
fix mis-spelling in txlogz.go
...
Signed-off-by: czm <zhongming.chang@daocloud.io>
2019-08-18 22:21:06 +08:00
Sugu Sougoumarane
8d852ef7fa
Merge pull request #5105 from planetscale/morgo-followup-capabilities
...
Cleanup from capabilities PR
2019-08-17 10:09:26 -07:00
Sugu Sougoumarane
e1f9544600
Merge pull request #5106 from AllenZMC/patch-1
...
fix wrong spells in vtprocess.go
2019-08-17 10:07:26 -07:00
Sugu Sougoumarane
b359c101a0
Merge pull request #5107 from ethan-daocloud/patch-6
...
cleanup: fix typos in mysql/client.go
2019-08-17 10:07:09 -07:00
Guangming Wang
175cf95ec9
cleanup: fix typos in mysql/client.go
...
Signed-off-by: Guangming Wang <guangming.wang@daocloud.io>
2019-08-17 23:27:07 +08:00
AllenZMC
35e8803acb
fix wrong spells in vtprocess.go
...
Signed-off-by: czm <zhongming.chang@daocloud.io>
2019-08-17 17:38:02 +08:00
Derek Perkins
24d3d1be8f
schema: delay broadcast until end of Reload
...
Signed-off-by: Derek Perkins <derek@derekperkins.com>
2019-08-16 21:20:36 -06:00
Derek Perkins
c84cab2130
messages: rebuild topics on every table Reload
...
Signed-off-by: Derek Perkins <derek@derekperkins.com>
2019-08-16 21:20:36 -06:00
Derek Perkins
f6a162adbc
messages: resolve topic suggestions
...
Signed-off-by: Derek Perkins <derek@derekperkins.com>
2019-08-16 21:20:36 -06:00
Derek Perkins
0bf354546d
messages: add topic abstraction like Google PubSub
...
Signed-off-by: Derek Perkins <derek@derekperkins.com>
2019-08-16 21:20:36 -06:00
Derek Perkins
181aaf3f07
schema: add getString from comments
...
Signed-off-by: Derek Perkins <derek@derekperkins.com>
2019-08-16 21:20:36 -06:00
Derek Perkins
56e5b178e5
endtoend: factor out waitForMessage
...
Signed-off-by: Derek Perkins <derek@derekperkins.com>
2019-08-16 21:20:36 -06:00
Sugu Sougoumarane
a7983a3e3d
Merge pull request #5097 from systay/aggregation-distinct-with-empty-input
...
Make sure to handle COUNT and SUM with DISTINCT columns with empty input
2019-08-16 19:37:57 -07:00
Morgan Tocker
604165283d
Merge remote-tracking branch 'upstream/master' into morgo-followup-capabilities
...
Signed-off-by: Morgan Tocker <tocker@gmail.com>
2019-08-16 15:21:57 -06:00
Sugu Sougoumarane
cd686587f4
Merge pull request #5086 from ethan-daocloud/patch-5
...
keyspace.go: cleanup typo in error message
2019-08-16 13:03:50 -07:00
Sugu Sougoumarane
42dc5d8982
Merge pull request #5094 from kalfonso/kalfonso.190814-alter-vschema-add-autoinc
...
Allow adding autoincrement column via "ALTER VSCHEMA..." statement
2019-08-16 13:03:09 -07:00
Sugu Sougoumarane
8a4bb11467
Merge pull request #5100 from AllenZMC/patch-2
...
fix wrong spells in slave_connection.go
2019-08-16 13:01:01 -07:00
Morgan Tocker
d2e0312d0e
Cleanup from capabilities PR
...
Signed-off-by: Morgan Tocker <tocker@gmail.com>
2019-08-16 09:52:21 -06:00
Sugu Sougoumarane
2113547dff
Merge pull request #5093 from planetscale/ss-vrepl-charset
...
vreplication: fix character set issue
2019-08-15 16:41:16 -07:00
AllenZMC
476cf9e233
fix wrong spells in slave_connection.go
...
Signed-off-by: czm <zhongming.chang@daocloud.io>
2019-08-15 21:56:34 +08:00
Anthony Yeh
25c2f15cbe
Auto-detect engine when restoring backups ( #5092 )
...
* Auto-detect engine when restoring backups
Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
* Add FinishedTime to MANIFEST.
Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
* Store stream mode in xtrabackup MANIFEST.
Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
* Address review comments.
Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
2019-08-14 20:53:16 -07:00
Deepthi Sigireddi
98305946f5
Merge pull request #5066 from planetscale/ds-xb-5062
...
tablet should stay healthy while running xtrabackup
2019-08-14 18:50:19 -07:00
Deepthi Sigireddi
1acc4aab79
Merge pull request #5096 from planetscale/sa-fix-static-check
...
Address staticcheck warnings in prepared statement
2019-08-14 16:58:40 -07:00
Saif Alharthi
5533c2212e
Address comment
...
Signed-off-by: Saif Alharthi <saif@saifalharthi.me>
2019-08-14 16:20:22 -07:00
deepthi
c51e07f558
export stats for both online and offline backups, use mutex correctly to protect all access to _isBackupRunning and the stats variable
...
Signed-off-by: deepthi <deepthi@planetscale.com>
2019-08-14 16:02:53 -07:00
Saif Alharthi
bfa8482c1e
Quick fix
...
Signed-off-by: Saif Alharthi <saif@saifalharthi.me>
2019-08-14 13:00:59 -07:00
Andres Taylor
01a30bb3f4
Make sure to handle COUNT and SUM with DISTINCT columns
...
Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-08-14 19:02:41 +02:00
Saif Alharthi
53310a35e1
Address staticcheck warnings in prepared statement
...
Merged prepared statement code changes did not take into account
staticcheck warnings. This PR addresses those warnings.
Signed-off-by: Saif Alharthi <saif@saifalharthi.me>
2019-08-14 09:29:54 -07:00
Andres Taylor
0420a592f7
Small test that exposes problem
...
Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-08-14 17:01:32 +02:00
Andres Taylor
4dea5a55e8
Move one test file to testify
...
Signed-off-by: Andres Taylor <antaylor@squareup.com>
2019-08-14 16:55:02 +02:00
AllenZMC
d66ffcdf85
fix wrong spells in opentsdb.go
...
Signed-off-by: czm <zhongming.chang@daocloud.io>
2019-08-14 21:14:36 +08:00
Karel Alfonso Sague
c031bd6dab
Allow adding autoincrement column via "ALTER VSCHEMA..." statement
...
Signed-off-by: Karel Alfonso Sague <kalfonso@squareup.com>
2019-08-14 20:19:19 +10:00
Guangming Wang
e370f9a007
keyspace.go: cleanup typo in error message
...
also fix its corresponding test file typos
Signed-off-by: Guangming Wang <guangming.wang@daocloud.io>
2019-08-14 13:37:36 +08:00
Sugu Sougoumarane
9bfe0092d2
vreplication: fix character set issue
...
The latin1 character set performs some conversion, which was
not our previous understanding. This changes vreplication to
use binary character set instead, which is more faithful about
not converting the bits in the database.
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-08-13 20:38:38 -07:00
Sugu Sougoumarane
08d588e853
Merge pull request #5080 from kalfonso/kalfonso.190810-alter-vschema-add-sequence-table
...
Allow adding sequence table to the vschema via ALTER VSCHEMA ADD SEQU…
2019-08-13 20:27:29 -07:00
Sugu Sougoumarane
7149b40c01
Merge pull request #5089 from AllenZMC/patch-1
...
fix wrong spells in tablet.go
2019-08-13 20:23:28 -07:00
deepthi
43bb0cfa0a
add doc for new stats var
...
Signed-off-by: deepthi <deepthi@planetscale.com>
2019-08-13 19:14:30 -07:00
Karel Alfonso Sague
77089dbe0b
Allow adding sequence table to the vschema via ALTER VSCHEMA ADD SEQUENCE TABLE statement
...
Signed-off-by: Karel Alfonso Sague <kalfonso@squareup.com>
2019-08-14 09:44:23 +10:00
Rasika Kale
ac0cdc6d03
- Changed NullsafeAdd() in ordered_aggregate.go to return only a value, rather than value or error
...
Signed-off-by: Rasika Kale <rasika@planetscale.com>
2019-08-13 15:24:16 -07:00
Rasika Kale
f526d4795a
- Deleted functions that are not related to addition expression
...
- Made rk-add-expression only for addition function
Signed-off-by: Rasika Kale <rasika@planetscale.com>
2019-08-13 13:25:09 -07:00
Rasika Kale
313a830674
- Fixed code based off comments from Github
...
- Deleted unnecessary comments
- Fixed whitespace
Signed-off-by: Rasika Kale <rasika@planetscale.com>
2019-08-13 13:09:26 -07:00
Anthony Yeh
4602af6931
Fix UpdateCellsAlias. ( #5090 )
...
* Fix UpdateCellsAlias.
It should allow updates to an alias that overlap with the previous value
of that same alias, since the old value is being replaced.
Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
* Refactor overlappingAlias to validateAlias.
To make it more clear which outcome is good and which is bad.
Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
2019-08-13 12:17:58 -07:00
AllenZMC
ed078eb0ab
Update tablet.go
...
Signed-off-by: czm <zhongming.chang@daocloud.io>
2019-08-14 00:35:34 +08:00
deepthi
c66d22d74a
#5048 changed how we delete from copy_state table, the testcase needs to be updated to conform to that
...
Signed-off-by: deepthi <deepthi@planetscale.com>
2019-08-13 08:52:18 -07:00
Sugu Sougoumarane
5a2a09a8df
Merge pull request #5057 from planetscale/ds-lastpk-fix
...
fix duplicate key error during resharding
2019-08-12 17:52:10 -07:00
Sugu Sougoumarane
1b8dc212d5
Merge pull request #5064 from planetscale/ss-vrepl-participants
...
migrater: resharding_journal: participants change
2019-08-12 17:39:32 -07:00
Sugu Sougoumarane
29f02a57fc
Merge pull request #5073 from ethan-daocloud/dev-wgm-190810
...
package/worker: misspelled word in html template correction
2019-08-12 17:39:13 -07:00
Deepthi Sigireddi
b5eb51a6b1
Merge pull request #5074 from ethan-daocloud/patch-4
...
cleanup: word correction in tx_serializer.go
2019-08-12 10:35:50 -07:00
Deepthi Sigireddi
389cb88cd2
Merge pull request #5079 from AllenZMC/patch-1
...
fix wrong spells in acl.go
2019-08-12 10:35:08 -07:00
Anthony Yeh
1ecdd8a9f6
vtbackup: Don't enforce timeouts. ( #5071 )
...
These have done more harm than good. If a backup has been going for a
while, giving up and starting over from scratch is pretty much never
going to help. We should just keep trying and have a system that
alerts a human if it's taking longer than expected.
Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
2019-08-12 09:52:48 -07:00
AllenZMC
270484d4ee
fix wrong spells in acl.go
...
Signed-off-by: czm <zhongming.chang@daocloud.io>
2019-08-12 23:42:56 +08:00
Jon Tirsen
b9d707fbc4
Merge pull request #5054 from kalfonso/kalfonso.190801-vttestserver-alter-vschema
...
Add ability to process vschema migrations during vttestserver startup
2019-08-12 13:50:50 +10:00
Deepthi Sigireddi
999613d6bf
Merge branch 'master' into ds-xb-5062
2019-08-10 19:36:24 -07:00
Deepthi Sigireddi
7e99841f01
Merge pull request #5065 from planetscale/xtrabackup-stream-logs
...
xtrabackup: Better support for large datasets
2019-08-10 19:32:55 -07:00
Anthony Yeh
870a07f626
Add unit test for data striping.
...
Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
2019-08-10 14:58:18 -07:00
Anthony Yeh
b185573179
Add data striping for xtrabackup.
...
Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
2019-08-10 10:12:57 -07:00
Anthony Yeh
af13447826
Add verbose flag to xbstream extraction command.
...
Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
2019-08-10 10:12:57 -07:00
ethan
8068703603
cleanup: word correction in tx_serializer.go
...
Signed-off-by: Guangming Wang <guangming.wang@daocloud.io>
2019-08-10 23:45:04 +08:00
Guangming Wang
b18aadfbe6
package/worker: misspelled word in html template correction
...
Signed-off-by: Guangming Wang <guangming.wang@daocloud.io>
2019-08-10 16:27:40 +08:00
Anthony Yeh
fdce9691fd
Clean up Close() error handling.
...
Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
2019-08-09 23:05:24 -07:00
deepthi
9a2571b447
check whether backup is already running
...
Signed-off-by: deepthi <deepthi@planetscale.com>
2019-08-09 21:32:50 -07:00
deepthi
f0b6b964f3
implement boolean state for xtrabackup, and stats variable for whether online backup is running
...
Signed-off-by: deepthi <deepthi@planetscale.com>
2019-08-09 21:23:38 -07:00
Anthony Yeh
93074c50a6
Use move-back instead of copy-back.
...
To avoid requiring 2x disk space upon restore.
Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
2019-08-09 15:58:45 -07:00
Anthony Yeh
4cb274d9fe
xtrabackup: Add verbose flag to tar.
...
Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
2019-08-09 14:56:01 -07:00
Anthony Yeh
36fef026e8
Scan lines to send to logger instead of direct write.
...
Direct write didn't use Infof() so there was no timestamp.
Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
2019-08-09 14:19:43 -07:00
Rasika Kale
aa9808ad42
- Completed Addition expression and added appropriate tests
...
- In the process of implenting subtraction and multiplication function (marked within comments)
Signed-off-by: Rasika Kale <rasika@planetscale.com>
2019-08-09 10:49:45 -07:00
Saif Alharthi
d90e723373
Address comments
...
Signed-off-by: Saif Alharthi <saif@saifalharthi.me>
2019-08-08 23:02:53 -07:00
Saif Alharthi
58a810f823
Fixed tests and bug in ComPrepare
...
Signed-off-by: Saif Alharthi <saif@saifalharthi.me>
2019-08-08 22:05:45 -07:00
Saif Alharthi
d7fb060862
Merge remote-tracking branch 'origin/master' into tiglabs-prepare
...
Signed-off-by: Saif Alharthi <saif@saifalharthi.me>
2019-08-08 21:54:19 -07:00
Anthony Yeh
b56856b301
xtrabackup: Stream stderr to logs.
...
This is needed for long-running backups so that the xtrabackup process
doesn't block after the write buffer fills up.
It's also nice for checking in on progress during a long upload.
Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
2019-08-08 19:46:19 -07:00
deepthi
e663c319f6
address review comments
...
Signed-off-by: deepthi <deepthi@planetscale.com>
2019-08-08 17:51:32 -07:00
deepthi
89c4752cf1
don't take the action lock while running xtrabackup because that prevents tablet from updating its replication lag
...
Signed-off-by: deepthi <deepthi@planetscale.com>
2019-08-08 17:32:23 -07:00
Sugu Sougoumarane
a78412ac43
migrater: resharding_journal: participants change
...
Make all sources as participants. It's not worth doing exact
computations in this case.
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-08-08 15:37:34 -07:00
Sugu Sougoumarane
23c5ac32d5
Merge pull request #5048 from planetscale/ss-vrepl-clean-copy-state
...
vreplication: clean-up copy_state correctly
2019-08-08 15:30:26 -07:00
Morgan Tocker
00dfc65f38
Add initial support for capabilities ( #4987 )
...
* Add initial support for capabilities
This eliminates the need to set MYSQL_FLAVOR
Signed-off-by: Morgan Tocker <tocker@gmail.com>
* Removed MYSQL_FLAVOR variable precedence
It will cause backwards compatibility problems,
since many users set "MySQL56" for any MySQL system.
Signed-off-by: Morgan Tocker <tocker@gmail.com>
* Address PR feedback (WIP)
Signed-off-by: Morgan Tocker <tocker@gmail.com>
* Fixed mysql_safe to not use capabilitities
Reverted small changes to configs
Signed-off-by: Morgan Tocker <tocker@gmail.com>
* fix version detection
Signed-off-by: Morgan Tocker <tocker@gmail.com>
* Fix style, re-add EXTRA_MY_CNF from review
Signed-off-by: Morgan Tocker <tocker@gmail.com>
* Address review feedback
Signed-off-by: Morgan Tocker <tocker@gmail.com>
* address remaining feedback
Signed-off-by: Morgan Tocker <tocker@gmail.com>
* Remove rogue added space
Signed-off-by: Morgan Tocker <tocker@gmail.com>
* Address PR feedback
Signed-off-by: Morgan Tocker <tocker@gmail.com>
* Address PR feedback
Signed-off-by: Morgan Tocker <tocker@gmail.com>
* Fix broken test
Signed-off-by: Morgan Tocker <tocker@gmail.com>
* Fixed tests
Signed-off-by: Morgan Tocker <tocker@gmail.com>
* Addressed PR feedback
Added tests for version detection
Signed-off-by: Morgan Tocker <tocker@gmail.com>
* update copyright
Signed-off-by: Morgan Tocker <tocker@gmail.com>
* Remove unset MYSQL_FLAVOR
I thought about this: it's a bad idea.
It means that if there was a test that created 2 mysqld's, the usage
would not be repeatable/idempotent.
Signed-off-by: Morgan Tocker <tocker@gmail.com>
* Make sure error is caught.
Signed-off-by: Morgan Tocker <tocker@gmail.com>
* Address PR Feedback
Signed-off-by: Morgan Tocker <tocker@gmail.com>
2019-08-07 23:41:43 -07:00
Deepthi Sigireddi
8dcbbb9acd
Merge pull request #5052 from planetscale/vtbackup-skip
...
vtbackup: Only consider complete backups when looking for latest backup.
2019-08-07 11:44:36 -07:00
Saif Alharthi
3dc1bf5ceb
Merge remote-tracking branch 'origin/master' into tiglabs-prepare
...
Signed-off-by: Saif Alharthi <saif@saifalharthi.me>
2019-08-07 10:01:15 -07:00
Saif Alharthi
0fedf79990
Fix Tests
...
Signed-off-by: Saif Alharthi <saif@saifalharthi.me>
2019-08-07 09:53:30 -07:00
Karel Alfonso Sague
aa33b3aab8
Add ability to process vschema migrations during vttestserver startup
...
Signed-off-by: Karel Alfonso Sague <kalfonso@squareup.com>
2019-08-07 15:36:12 +10:00
Rasika Kale
0307a2e372
- Completed Addition function in arithmetic.go to match behavior similar to mySQL
...
- Added possible tests for Addition function within arithmetic_test.go
Signed-off-by: Rasika Kale <rasika@planetscale.com>
2019-08-06 13:17:21 -07:00
deepthi
4c288f447e
fix duplicate key error during copy phase caused by incorrectly inserting during catchup phase of vreplication based resharding, add test case
...
Signed-off-by: deepthi <deepthi@planetscale.com>
2019-08-06 11:00:58 -07:00
Sugu Sougoumarane
7664d27b15
Merge pull request #5049 from ethan-daocloud/patch-3
...
cleanup: correct logging message
2019-08-05 20:20:46 -07:00
Sugu Sougoumarane
a28385520f
Merge pull request #5053 from planetscale/jw-fix-ApplyRoutingRules-file-flag
...
Fix ApplyRoutingRules -rules_file flag
2019-08-05 20:16:45 -07:00
ethan
5195bd6f35
cleanup: correct logging message
...
Signed-off-by: ethan <guangming.wang@daocloud.io>
2019-08-06 09:53:33 +08:00
Alex Charis
eb9f8a0d88
add a testcase to binlog_event_json_test
...
Signed-off-by: Alex Charis <acharis@hubspot.com>
2019-08-05 20:59:02 -04:00
Anthony Yeh
d4d4c34ec6
vtbackup: Only consider complete backups when looking for latest backup.
...
If the latest backup is incomplete, we should ignore it and take another
one.
Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
2019-08-05 17:18:05 -07:00
John Watson
f914826c43
Fix ApplyRoutingRules -rules_file flag
...
Signed-off-by: John Watson <johnw@planetscale.com>
2019-08-05 16:30:50 -07:00
Anthony Yeh
6daeec0012
Update vendored GCS client version ( #5047 )
...
* Update GCS client version.
Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
* restore: Add more detail to errors during file copy.
Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
2019-08-05 12:01:46 -07:00
Sugu Sougoumarane
20d83134bf
vreplication: ignore table not found error
...
Legacy mode vreplication will not create copy_state.
So, we have to ignore the table not found error when
deleting from copy_state.
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-08-04 19:37:34 -07:00
Sugu Sougoumarane
96138755a9
vreplication: clean-up copy_state correctly
...
* On delete of a row in _vt.vreplication, we should also cleanup
the copy_state table, because it may have related rows.
* Made workflow into a flag, but mandatory. Otherwise the number
of unnamed arguments are too many and command becomes unreadable.
* Added ability to read from _vt.copy_state using VReplicaionExec.
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-08-04 15:51:40 -07:00
Sugu Sougoumarane
dfda28482f
migrater: adddress more review comments
...
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-08-04 12:54:31 -07:00
Sugu Sougoumarane
4b86104476
migrater: address review comments
...
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-08-03 19:52:41 -07:00
Sugu Sougoumarane
3b44876002
migrater: expose separate vtctl commands
...
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-08-03 19:52:41 -07:00
Sugu Sougoumarane
0257cc06f7
migrater: auto-detect migration type
...
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-08-03 19:52:41 -07:00
Sugu Sougoumarane
40ef5ff329
migrater: use workflow as input
...
Specifying shards and uids wasn't user-friendly. Specifying
workflow names should better. However, it will be the user's
responsibilty to keep them unique.
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-08-03 19:52:41 -07:00
Sugu Sougoumarane
1a88365c77
migrater: simplify parameters
...
Since we don't support multiple source or target keyspaces, the
uid parameters can be simplified to only have shards as keys, and
there will be a separate targetKeyspace parameter that applies to
all shards.
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-08-03 19:52:41 -07:00
Sugu Sougoumarane
61af9f7dc5
migrater: add logs and comments
...
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-08-03 19:52:41 -07:00
Sugu Sougoumarane
19f23cc041
migrater: add more fields to Journal
...
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-08-03 19:52:41 -07:00
Sugu Sougoumarane
da43f739cc
migrater: make table routing rules symmetrical
...
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-08-03 19:52:41 -07:00
Sugu Sougoumarane
e359f3e058
migrater: unit tests done
...
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-08-03 19:52:41 -07:00
Sugu Sougoumarane
12d92d8390
migrater: refactor tests, and add more
...
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-08-03 19:52:41 -07:00
Sugu Sougoumarane
0614231fac
migrater: more tests and cleanup
...
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-08-03 19:52:41 -07:00
Sugu Sougoumarane
fa295dec75
migrater: more tests
...
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-08-03 19:52:41 -07:00
Sugu Sougoumarane
82cfaf115f
migrater: quick cleanup
...
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-08-03 19:52:41 -07:00
Sugu Sougoumarane
bcf5787d77
migrater: test framework and initial test
...
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-08-03 19:52:41 -07:00
Sugu Sougoumarane
f1d0958033
migrater: migrate reads and validate
...
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-08-03 19:52:41 -07:00
Sugu Sougoumarane
3fb294471c
migrater: initial cut
...
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
2019-08-03 19:52:41 -07:00
Sugu Sougoumarane
aace051644
Merge pull request #5039 from planetscale/ds-bl-event-json-doc
...
JSON String length computation: docs and unit tests
2019-08-03 18:53:18 -07:00
Sugu Sougoumarane
af954f0dd6
Merge pull request #5042 from kalfonso/kalfonso.190730-vttestserver-localhost
...
Allow start local cluster using a provided tablet host name
2019-08-03 18:51:54 -07:00
Saif Alharthi
a138a405df
Merge remote-tracking branch 'origin/master' into tiglabs-prepare
...
Signed-off-by: Saif Alharthi <saif@saifalharthi.me>
2019-07-31 21:26:53 -07:00
Karel Alfonso Sague
1d4652db29
Allow start local cluster using a provided tablet host name
...
This helps fix a name resolution problem when initializing the tablet. If flag "tablet_hostname" is not provided it will be derived from the OS' hostname. The way it is implemented there is not guarantee that ```net.LookupHost(os.HostName())``` will return a valid IP for certain local env dns configs, i.e, in Mac OS X, hostname can be configured using the system's resolver which is not used by ```net.LookupHost```
Reference: init_tablet.go:151
Signed-off-by: Karel Alfonso Sague <kalfonso@squareup.com>
2019-07-31 13:48:27 +10:00
Rasika Kale
c7bd871ffa
Fixed Test Results in arithmetic_test.go to output correctly
...
Signed-off-by: Rasika Kale <rasika@planetscale.com>
2019-07-30 15:54:36 -07:00
deepthi
c936f1a9dc
add unit tests for 1-byte, 2-byte and 3-byte json string lengths
...
Signed-off-by: deepthi <deepthi@planetscale.com>
2019-07-30 12:34:09 -07:00
Saif Alharthi
017cf57f88
Quick fix
...
Signed-off-by: Saif Alharthi <saif@saifalharthi.me>
2019-07-30 12:21:18 -07:00
Saif Alharthi
5eb5830783
Addressed partial comments
...
Signed-off-by: Saif Alharthi <saif@saifalharthi.me>
2019-07-30 11:24:02 -07:00
deepthi
ca871d3443
also add a link to mysql server 8.0 implementation
...
Signed-off-by: deepthi <deepthi@planetscale.com>
2019-07-30 08:48:18 -07:00
deepthi
fed4d0e034
change function name to be more descriptive, add link to mysql source and comments
...
Signed-off-by: deepthi <deepthi@planetscale.com>
2019-07-30 08:41:20 -07:00
Sugu Sougoumarane
f93c96c738
Merge pull request #5005 from kalfonso/kalfonso.190717-resharding-workflow-consistent-snapshot
...
Enable vitess horizontal resharding workflow to use consistent snapsh…
2019-07-29 23:18:30 -07:00
Alex Charis
c6bd993274
fix readVariableInt; add test
...
Signed-off-by: Alex Charis <acharis@hubspot.com>
2019-07-29 23:33:40 -04:00
Rasika Kale
fd3caf2cee
Adjusted castFromNunmeric() to return only Value instead of Value and error
...
Changed tests TestAdd and TestCastFromNumeric_in arithmetic_test.go to return value output instead of error
Signed-off-by: Rasika Kale <rasika@planetscale.com>
2019-07-29 15:26:05 -07:00
Sugu Sougoumarane
df17631996
Merge pull request #4938 from planetscale/ss-max-rows
...
vtgate: warning threshold for in-memory rows
2019-07-27 12:30:10 -07:00
Sugu Sougoumarane
87609d9c77
Merge pull request #4991 from HubSpot/vstream-java-grpc
...
add vstream to java grpc client
2019-07-27 12:13:00 -07:00
Sugu Sougoumarane
cf7f71b46e
Merge pull request #5015 from enriquebris/go-pools-NewResourcePool-typo
...
fixed typo in pools.NewResourcePool docs comments
2019-07-27 11:03:07 -07:00
Sugu Sougoumarane
fabcc3915c
Merge pull request #5016 from planetscale/tj-diff-off-by-1-rows-processed
...
Fix off-by-1 error for row_differ counting rows processed, not counting empty iteration.
2019-07-27 11:02:48 -07:00
Sugu Sougoumarane
11c770f0bf
Merge pull request #5020 from planetscale/tj-fix-table-plan-builder-colname
...
Fix table_plan_builder to correctly use formatted column names that escape keywords
2019-07-27 11:00:51 -07:00
Sugu Sougoumarane
9a6e7da468
Merge pull request #5023 from bumbing/upstream
...
Keep the lowest cost vindex for each column if there are multiple ones
2019-07-27 10:58:12 -07:00
Sugu Sougoumarane
7ff352bbb1
Merge pull request #5024 from ethan-daocloud/patch-1
...
cleanup: correct word mis-spell in error msg
2019-07-27 10:50:54 -07:00
Sugu Sougoumarane
a5f923d1a0
Merge pull request #5025 from ethan-daocloud/patch-2
...
cleanup: error message word correction
2019-07-27 10:50:34 -07:00
Morgan Tocker
70737a1666
Fix regression introduced by #4993
...
Signed-off-by: Morgan Tocker <tocker@gmail.com>
2019-07-26 18:22:12 -07:00
Mingjian Liu
e6f206465d
Keep the lowest cost vindex for each column if there are multiple ones
...
Signed-off-by: Mingjian Liu <mingjianliu@pinterest.com>
2019-07-26 16:48:09 -07:00
Rafael Chacon
35abf59f6a
Improvements per code review
...
* Do not deprecate old metrics.
* Improve name of route Table -> TableName
* Improve name of Primitive TableName -> GetTableName
* Do not join keyspace names in join primitive if it's the same name
Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
2019-07-26 11:56:05 -07:00
ethan
8b5ef8e025
cleanup: error message word correction
...
correct message for easy understanding.
Signed-off-by: ethan <guangming.wang@daocloud.io>
2019-07-26 14:01:55 +08:00
ethan
3a7d536447
cleanup: correct word mis-spell in error msg
...
Signed-off-by: ethan <guangming.wang@daocloud.io>
2019-07-26 13:41:24 +08:00