In the process:
- fixing binlog replay starting from a timestamp: we just cannot skip
the events at a lower level, as the binlogs may contain format event,
binlog GTID set events, and so on. We need to parse them all.
- adding support for MySQL 5.6 PREVIOUS_GTIDS_EVENT event. It contains a
SIDBlock, adding parsing for that (we already had code to generate it,
as it's used to start replication from a GTIDSet).
- Some code in vtmysql_internals.h was incorrectly compiling for MySQL
5.6 and higher, when it should have been 5.5.
* More changes to TabletServer transitions: Found more corner
cases where the new transactional requests can race against
state transitions. To simplify this, we allow such commands
only if the tabletserver is the master. Also, we wait for
all inflight transactional requests to complete before
rolling back transactions. This will prevent a new
transactional command from landing after a tx pool
had been fully rolled back.
* Some more clean-up on TabletServer: SplitQueryV2 also
uses execRequest now.
* Typos: aciton->action
This command allows to run "RefreshState" on all tablets for a given shard.
This is useful in the following cases:
* when tablets must be refreshed after a blacklist rule was removed
* manually refreshing tablets e.g. when filtered replication was enabled or disabled
B=31752251
All previously mentioned tabletserver workflow issues
are addressed now.
* A master->non-master transition immediately rolls back all
transactions including the prepared ones. This addresses the case
where MySQL was externally reparented.
* A master->shutdown transition waits till all transactions are
resolved. This addresses the reparent caused by the resharding
workflow. We don't want to shut down with unresolved transactions.
This code path is also used for normal reparents, where this behavior
is also acceptable.
* There is no race condition between state transition code and other
transactional commands. When we transition between two serving types,
we don't allow any requests until the transactions are rolled back.
During shutdown, we allow transactional statements, but the transition
code only waits for transactions to be resolved. So, there's no race
in either situation.
Added new flag "--grpc_max_message_size" which defaults to 4 MiB (the gRPC 1.0.0 default).
Such large messages can occur when users try to insert very big rows. If they hit the limit, they'll see the following error:
grpc: received message length XXXXXXX exceeding the max size 4194304
- If there are other types which must be migrated before MASTER, include them in the error message.
- Before doing this check, always check first if the to be migrated type is actually listed in the "Shard" object.
bootstrap.sh is currently failing in our Travis CI tests because "golint" dropped support for Go 1.5.
While we're at it, let's upgrade to 1.7 instead of 1.6. (After all, 1.7 also comes with a significant speed improvement.)
* More tests for Prepare, full coverage.
* Changed commit to use background context so it never times out.
* Changed Rollback to not return early under some conditions.
* Prepare from redo logs implemented, but more tests needed.
* TabletServer implementation of Prepare.
* Fix error handling in TabletServer.
* TwoPC doesn't depend on TxPool any more.
* Transactions with no statements are rolled back as no-op.
* Addressed code review comments.
The TabletServer state transition has some complications:
* SetServingType is currently just a flag flip. But it can
leave unresolved prepared transactions. This needs to be handled
correctly.
* For normal transitions out of master (or shutdown), prepared
transactions have to be rolled back because they will be
resurrected elsewhere. The current implementation waits
for prepared transactions to be resolved.
* For resharding, we'll need a special shutdown that waits
for prepared transactions to be resolved.
* If we allow CommitPrepared during shut down, it can cause
a race condition with the code that rolls back prepared transactions.
We need to add synchronization to prevent this.
This situation can occur when you e.g. run the online SplitClone only and then try to migrate types.
Note that vtctl MigrateServedFrom already has a similar check where it checks that there are three "ServedFroms" entries (one for each serving type).
Before, string(i) was shown where i is the index of the array element (e.g. 0, 1 or 2). string(i) for these low i values always returned an empty string because it would be interpreted as an ASCII code and these low values do not map to printable characters.
Other changes:
- use upper case tablet type string in the ServedFrom output. This is consistent with the "Gateway Status" and "Health Check Cache" output.
- Fixed output of the ShardingColumnType enum.
* Add Launching Vitess to vitess.io
* Fix markdown links.
* Fix Guides link
* split LaunchingVitess.md into subsections.
* rename Preparing for Production to Production Planning
* Turn TODOs into HTML comments
* Elaborate on cluster orchestration
* Use consistent capitalization of subheadings.
* Elaborate on application query patterns
* Elaborate on failover troubleshooting.
* Elaborate on additional MySQL parameters.
* Describe init_db.sql
* Document Orchestrator integration