Граф коммитов

8716 Коммитов

Автор SHA1 Сообщение Дата
Anthony Yeh 1126df44cc php: Fix zero-length edge case in RowValues(). 2016-02-29 21:56:27 -08:00
Anthony Yeh 12ec464556 Merge pull request #1535 from enisoc/test-fixes
Test fixes
2016-02-29 19:41:58 -08:00
Michael Berlin fa32a6481d Merge pull request #1532 from michael-berlin/vtworker_webinterface_errors
vtworker: Prefix topology errors shown in webinterface.
2016-02-29 18:33:49 -08:00
Michael Berlin 6de4a08d33 vtworker: Do not capitalize first word in error message to adhere to Go "style guide". 2016-02-29 18:18:44 -08:00
Michael Berlin ede64f44f9 vtworker: Prefix topology errors shown in webinterface.
Before this change, the webinterface would only show "node doesn't exist", for example when GetShard() failed due to an inconsistent topology.
2016-02-29 18:17:46 -08:00
Anthony Yeh 57b70cbf01 examples/local: Start/stop vttablet/mysqld in parallel.
This speeds up the test/local_example.sh test.
2016-02-29 15:09:03 -08:00
Liang 51463dc1be Merge pull request #1530 from youtube/vtgate
Rename the LowReplicationLag flag var, so it can be used outside.
2016-02-29 15:01:18 -08:00
Anthony Yeh 4e54ba821a Fix missing checkedGet() calls in Java example client. 2016-02-29 14:38:02 -08:00
Liang Guo b334fd2461 Fix typos. 2016-02-29 14:01:30 -08:00
Liang Guo 61238551de Rename the LowReplicationLag flag var, so it can be used outside. 2016-02-29 13:15:02 -08:00
Anthony Yeh 8a2db6598c Merge pull request #1529 from enisoc/semisync
Fixes for new semi-sync handling.
2016-02-29 10:56:19 -08:00
Alain Jobart 5addb045ed Merge pull request #1524 from alainjobart/resharding
gRPC python client refactor
2016-02-29 10:32:13 -08:00
Michael Berlin 38c34a830e Merge pull request #1520 from michael-berlin/log_slowness
binlog: Log for show queries how long they took.
2016-02-29 10:24:18 -08:00
Alain Jobart 9a3d527bdc Common function from proto3_encoding in grpc update stream client. 2016-02-29 09:26:52 -08:00
Alain Jobart 39ac3e9721 Splitting up the grpc vtgate python client into two parts:
- a reusable proto3 encoding / decoding class.
- the core gRPC code (includes query routing and error handling).

That way it's trivial to use proto3 on any other transport.
2016-02-29 09:26:52 -08:00
Anthony Yeh 50a2870285 Fixes for new semi-sync handling. 2016-02-27 03:22:54 -08:00
Anthony Yeh 9ced8cc6eb Merge pull request #1528 from enisoc/grpc-0.13
Update to gRPC 0.13.
2016-02-27 03:14:23 -08:00
Anthony Yeh bbbccb0a88 Update MariaDB version in Travis. 2016-02-27 02:31:07 -08:00
Anthony Yeh 3f2d479a9a docker/bootstrap: Build gRPC PHP plugin from gRPC sources.
The pecl build isn't always up-to-date with the gRPC version we use.
2016-02-27 02:31:07 -08:00
Anthony Yeh 02f25cbe24 Fix indentation in .travis.yml 2016-02-27 02:31:07 -08:00
Anthony Yeh 3c3c713c18 Install newer pip in docker/bootstrap. 2016-02-27 02:31:07 -08:00
Anthony Yeh 249abf4139 Remove newlines from RPC error messages.
This is only necessary at the moment because gRPC 0.13 has a bug that
occurs when error messages contain newlines. However, we might as well
keep it this way because newlines in Go errors are not really
conventional anyway.
2016-02-27 02:31:07 -08:00
Anthony Yeh 0c67eaa410 Fix goroutine leak if a vtctl command panics. 2016-02-27 02:31:07 -08:00
Anthony Yeh 938f31743d Update to gRPC 0.13. 2016-02-27 02:31:03 -08:00
Anthony Yeh 4e13248a69 Merge pull request #1521 from enisoc/semisync
Support semi-sync without async fallback.
2016-02-25 15:54:04 -08:00
Anthony Yeh 6dc99de5bd Merge pull request #1523 from enisoc/cli-tables
Print human-readable tables for CLI queries.
2016-02-25 15:53:04 -08:00
Anthony Yeh 23f91535e5 Make JSON field names for QueryResult consistent with protobuf. 2016-02-25 15:22:41 -08:00
Anthony Yeh f92686a2a4 Print human-readable tables for CLI queries.
The table output is similar to the `mysql` CLI.
2016-02-25 15:01:33 -08:00
Anthony Yeh 43b007dbb8 Test semi-sync toggling in wrangler/testlib. 2016-02-25 11:59:38 -08:00
sougou 1159a12165 Merge pull request #1522 from youtube/export_nerd
Exporting internal changes back to open-source.
2016-02-24 21:58:18 -08:00
Sugu Sougoumarane b111b0d574 Exporting internal changes back to open-source. 2016-02-24 21:30:23 -08:00
Michael Berlin c479de075d binlog: Log for show queries how long they took. 2016-02-24 18:23:06 -08:00
Anthony Yeh 3892568ff7 Use semi-sync in examples. 2016-02-24 18:10:10 -08:00
Anthony Yeh 44d10d40c4 Use semi-sync in integration tests.
Some tests had to be modified to not assume that masters without
replicas will still accept writes. Also, some tests would create tablets
as SPARE without enabling healthcheck. As a result, the tablet has no
way of knowing whether it will eventually be a replica or rdonly, and
hence can't decide whether to enable semi-sync before starting
replication.

Healthcheck is basically required now, and definitely will be once we
fully switch to vtgate discovery mode. So I've removed cases where
tablets were being started SPARE without enabling healthcheck.
2016-02-24 18:08:12 -08:00
Anthony Yeh 6ed85e04ff mysqlctl: Check dbaPool connections before using them.
For SUPER queries (presumed to be administrative in nature),
this will test the connection given to us by the dbaPool before using
it. If we get "MySQL server has gone away (errno 2006)", try once to
reconnect before giving up.

This makes SUPER queries more resilient when mysqld goes away and then
comes back.
2016-02-24 18:08:12 -08:00
Anthony Yeh b6cdc578db Merge pull request #1519 from enisoc/java-datetime
java: Fix time zone offset in DateTime.formatTime().
2016-02-24 16:16:49 -08:00
Anthony Yeh dba5a6b3bb java: Fix time zone offset in DateTime.formatTime().
There was a bug that only showed up in time zones with positive offset
from GMT. I've added explicit tests for time zones with positive and
negative offsets.
2016-02-24 15:05:47 -08:00
Anthony Yeh a3efb4ebd2 Support semi-sync without async fallback.
When using semi-sync with rpl_semi_sync_master_wait_no_slave=1 and
rpl_semi_sync_master_timeout=[effectively infinite], it's necessary to
toggle master-side semi-sync at the proper times to prevent slaves from
getting stuck (since they have no slaves of their own to ACK).

This commit adds a new vttablet flag -enable_semi_sync, which causes the
replication-management features of Vitess (e.g. InitShardMaster and
various reparent operations) to automatically manage semi-sync settings.

With these settings, it becomes (reasonably) safe to reparent away from
an unresponsive master, as long as the following can be verified:

* All semi-sync slaves have stopped replicating from the old master.
* The chosen new master is the farthest ahead in replication.

Currently we only allow slaves marked in Vitess terms as "replica"
tablets to be semi-sync slaves (i.e. to send ACKs). Vitess slaves marked as
"rdonly" will NOT ACK, because they are not eligible to become masters,
so we never want them to be the only slave with the latest update.
This means when using semi-sync, every shard must have at least 2 live
"replica" type tablets (including the master) in order to accept writes.
2016-02-24 10:12:47 -08:00
Anthony Yeh 9b2d49772d Merge pull request #1518 from enisoc/logger
ConsoleLogger: Fix log depth and add unit test.
2016-02-24 10:12:17 -08:00
Alain Jobart 260ed58c60 Merge pull request #1517 from alainjobart/resharding
Parallelizing the schema load. On servers with 100s of tables,
2016-02-24 07:15:51 -08:00
Anthony Yeh 15683dca58 console_logger: Fix log depth and add unit test.
The log depth was right when using ConsoleLogger through a TeeLogger,
but it was wrong when using ConsoleLogger directly. It turns out this
was because in the TeeLogger case, an extra autogenerated conversion
method was being inserted in the call stack, messing up the depth
calculation:

9877900c8c/src/cmd/compile/internal/gc/subr.go (L2245)

I fixed this by converting ConsoleLogger to only use pointer receivers,
and setting the depth according to the correct stack, without the
autogenerated method.

I didn't see any way to redirect glog, so I'm using the subprocess
technique for the test.
2016-02-23 19:14:33 -08:00
Alain Jobart ee97f56555 Increasing schema conn pool from 2 to 3, that seems to give the best results.
Anything more is slower.
2016-02-23 14:55:59 -08:00
Alain Jobart 86b8e4093b Parallelizing the schema load. On servers with 100s of tables,
it makes vtcombo startup somewhat faster.
2016-02-23 11:30:43 -08:00
sougou f1d7c31e8b Merge pull request #1515 from Rastusik/insert_null_as_pk
fix - null as primary key is allowed in an insert statement with auto_increment
2016-02-22 14:25:28 -08:00
Rasta 1551584385 sqlAnalyzer - isNull function comment update 2016-02-22 22:59:28 +01:00
Rasta 928c58d4c9 fix - null as primary key is allowed in an insert statement with auto_increment 2016-02-22 22:51:52 +01:00
Michael Berlin 11c08ca717 Merge pull request #1514 from michael-berlin/export_automation_plumb_destination_pack_count
Expose the vtworker *Clone parameter "destination_pack_count" in the respective automation tasks.
2016-02-22 12:24:43 -08:00
Michael Berlin 80161bd8a1 Expose the vtworker *Clone parameter "destination_pack_count" in the respective automation tasks.
NOTE: This is an automated export. Changes were already LGTM'd internally.
2016-02-22 10:57:53 -08:00
Anthony Yeh 014aa049b3 Merge pull request #1511 from enisoc/java-async
Convert Java client to asynchronous RPCs.
2016-02-19 16:15:04 -08:00
Anthony Yeh 9cda983a52 java/client: Enforce limit on in-flight VTGateTx calls.
Because of the session cookie, only one asynchronous call can be
in-flight at a time. Violating that constraint is a bug in the client
app, so we throw an IllegalStateException to prevent race conditions.
2016-02-19 14:16:35 -08:00