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

1552 Коммитов

Автор SHA1 Сообщение Дата
Alain Jobart 156d559398 Merge branch 'master' into replication 2014-05-19 15:49:49 -07:00
Alain Jobart d92d6dee34 Supporting table wildcards in GetSchema.
Using regexp syntax.
Also supporting them in binlog player, and in blacklisted tables.
Meaning we can use wildcards in vertical splits.

Also adding -table_names_only to 'vtctl GetSchema', so it's easy
to test a regexp.
2014-05-19 14:57:25 -07:00
Peter Lobsinger db2b442cb2 Export SQLQueryStats so that StreamLogger consumers can read its properties. 2014-05-19 14:03:45 -07:00
Alain Jobart e2c18e7d2e Merge branch 'master' into replication 2014-05-19 10:54:21 -07:00
Alain Jobart bcc1d0b6d8 Adding unit test for PurgeTabletActions.
And fixing a bad return code in zk topo.
2014-05-19 10:52:56 -07:00
Alain Jobart 461f17d877 Adding comment for all fields of mycnf, and which
ones are used by vitess.
2014-05-16 16:00:15 -07:00
Alain Jobart b4fcbbe364 Let's be a bit more resilient to no mysql port.
We have ways to figure it out after all.
2014-05-16 15:39:00 -07:00
Alain Jobart 24c6dc4142 Fixing unit tests. 2014-05-16 14:09:53 -07:00
Alain Jobart fcd2db129b Merge branch 'master' into replication 2014-05-16 12:49:14 -07:00
Alain Jobart f1fa61f918 Merge branch 'master' of github.com:youtube/vitess 2014-05-16 12:48:58 -07:00
Alain Jobart a61534618a Supporting and using command line params in tests. 2014-05-16 12:48:19 -07:00
Alain Jobart 1abd8dfa20 Merge pull request #49 from plobsing/structured-streamlog
Structured streamlog
2014-05-16 12:42:37 -07:00
Alain Jobart eb3a8c2788 All flags are now specified in mycnf_flag.go. 2014-05-16 11:51:55 -07:00
Alain Jobart fd196c1b4f Re-organizing the mycnf flags.
Adding doc too. Privatizing methods. Long overdue.
The command line support is not here yet.
2014-05-16 11:25:52 -07:00
Alain Jobart b3b6cacb87 Removing unused parameters. 2014-05-16 09:44:52 -07:00
Alain Jobart c4bcd0b5cc Adding and checking vtgate->vtctld links. 2014-05-14 13:30:23 -07:00
Alain Jobart 208a7e99a6 Adding a status view of topo in vtgate. 2014-05-14 13:08:22 -07:00
Alain Jobart 90c9484d68 Merge branch 'replication' 2014-05-14 09:44:33 -07:00
Alain Jobart 321ef7ab05 Merge commit 'f7df4e7e97e66a6b3f3a9b2ea5645ec4d88e1c49' into replication 2014-05-14 09:43:41 -07:00
Alain Jobart 905eb39851 Moving a few status functions to this source tree.
They allow the status page of vttablet to be better.
Also testing this code in vtctld_test, so we make sure the
templates work. And manual inspection works very well too.
2014-05-14 09:41:49 -07:00
Peter Lobsinger 25c76075b1 Implement error case of downcasts in streamlog consumers.
This should never happen (famous last words).
2014-05-13 14:12:34 -07:00
Peter Lobsinger 7cc6b3d711 Avoid serializing to string in streamlog.
Some log consumers wish to receive structured messages. This is best
evidenced by the logz handlers parsing the message strings they receive.
2014-05-13 13:15:39 -07:00
Alain Jobart f7df4e7e97 Implementing copy of snapshots to central storage.
This uses specialized hooks, with sample versions for tests.
Have to re-run bootstrap.sh to pick them up.
2014-05-13 12:18:06 -07:00
Alain Jobart 4c956eb080 Fixing / adding messaging. 2014-05-12 14:02:02 -07:00
Alain Jobart e057466dbb Simplifying RebuildShard call. 2014-05-12 13:54:29 -07:00
Alain Jobart 8e833a6ea3 Fix to list of cells to build serving graph in.
When re-building a Keyspace that is ServedFrom another
keyspace, we need to save the SrvKeyspace object in all the
cells from the ServedFrom keyspace as well.
2014-05-12 10:12:47 -07:00
Alain Jobart 1664027296 Moving blp_checkpoint table creation to the MultiRestore code. 2014-05-09 15:07:38 -07:00
Alain Jobart 10af637326 Now defaulting -use_srv_shard_locks to true. Been working
in dev for a while now.
2014-05-09 13:41:46 -07:00
Alain Jobart dbffb41819 Allowing MultiRestore on more types. 2014-05-08 13:18:28 -07:00
Alain Jobart 5c028fabec Also limiting the QPS to toposerv in case of error.
And making the code a bti more testable, gained 3% code coverage
in the directory.
2014-05-08 11:25:22 -07:00
Alain Jobart a9e986dc66 Fixing keyspace rebuild to operate on the right cells.
Used to get the list of cells by looking at the cells that
contain a serving tablet in shard 0. Now use the intersection
of the union of all shard.Cells and the passed-in cell list.
2014-05-07 13:44:30 -07:00
Alain Jobart b4bbc9a41e Merge branch 'master' of github.com:youtube/vitess 2014-05-07 09:58:35 -07:00
Alain Jobart 51a0a02e65 Adding a check for replication position post snapshot. 2014-05-07 09:11:58 -07:00
Sugu Sougoumarane 6db93e8d77 parser: stream plan & parsed_query tests
Coverage is at 94%. All required code paths
are now fully covered in sqlparser.
2014-05-06 22:02:02 -07:00
Sugu Sougoumarane d76507802a parser: failure cases for tokenizer (WIP) 2014-05-06 18:02:03 -07:00
Sugu Sougoumarane 2b02a3b0ed parser: tokenizer tests and a bug fix 2014-05-06 17:16:46 -07:00
Sugu Sougoumarane 9e86c50b02 parser: improved tests & error messages (WIP) 2014-05-06 16:00:43 -07:00
Sugu Sougoumarane 0f8783d6bb Merge branch 'vtocc' 2014-05-05 18:18:19 -07:00
Sugu Sougoumarane 2fa5af21ac queryservice: query rules extention
Add new action type for query rules to support RETRY errors.
Change table blacklist rule for vertical split to return RETRY errors.
2014-05-05 15:41:37 -07:00
Liang Guo 5fc302d596 Update VTGate V2 2014-05-05 15:39:53 -07:00
Alain Jobart 1269153768 Merge branch 'master' of github.com:youtube/vitess 2014-05-05 11:04:32 -07:00
Sugu Sougoumarane 659f018de1 Merge branch 'vtocc' 2014-05-05 10:52:40 -07:00
Alain Jobart 08fa55863d Merge branch 'master' into replication 2014-05-05 10:49:05 -07:00
Alain Jobart e87c580992 Fixing an action cleanup bug.
After a failed action, we were recording the failure, but not
cleaning up the original action. And a test. Also some cleanup:
- added a 'vtctl ReadTabletAction command
- using it in tests to not wait random amounts of time
  (the added test time is less than the time gained!)
- also fixing parameter passing in tabletmanager.py test.
2014-05-05 10:42:30 -07:00
Sugu Sougoumarane 2d3db60cec fix typos 2014-05-04 21:54:37 -07:00
Sugu Sougoumarane 9355e873ea queryservice: rowcache invalidator moves into QueryEngine.
The rowcache invalidator was launched sepearately from QueryEngine
by SqlQuery. This had some potential race conditions that were
hard to resolve with this code structure.
Now, the invalidator is part of QueryEngine. This allows us to
close the invalidator as part of QueryEngine's close. We are
guaranteed that no requests will be allowed when Close gets called.
2014-05-04 21:45:13 -07:00
Sugu Sougoumarane f7dd824d4c queryservice: new state transition scheme
The previous scheme had some subtle race conditions that could lead to unexpected behavior.
This new scheme addresses all of them. There are still some race conditions to be resolved
with the rowcache invalidator, which will be addressed in the next CL.

- All state transitions require a write lock.
- Any section of code that requires a state not to change during an action will require a read lock.
- No long-running locks.
- Managing NOT_SERVING -> SERVING is straightforward. Since nothing else is allowed to happen during this time, we can make an exception and hold the lock for the entire operation.
- Once we're SERVING, there are two phases that we have to manage when disallowQueries gets called:
  1. Wait for existing transactions to complete.
  2. Wait for existing queries to complete.

Waiting for transactions:
Before we start waiting, we have to ensure that no new transactions can get created. Otherwise, we may introduce a race condition that ends up allowing the creation of a new transaction after we conclude that all existing transactions are completed.
How do we prevent this:
disallowQueries:
 - obtain write lock
 - transition SERVING to SHUTTING_TX
 - release write lock
 - wait for existing transactions to complete
Begin:
 - obtain read lock
 - verify SERVING state
 - create a transaction
 - release read lock
This guarantees that new calls to Begin will not go through when we start waiting for transactions to complete.

Waiting for queries:
disallowQueries:
 - obtain write lock
 - transition SHUTDOWN_TX to SHUTTING_DOWN
 - release write lock
 - wg.Wait()
Execute:
 - obtain read lock
 - verify SERVING or SHUTDOWN_TX
 - wg.Add(1)
 - release read lock
 - execute query
 - wg.Done()
This guarantees that no new queries will be allowed once disallowQueries starts wg.Wait(). When the function returns, we know that all existing queries have completed, we're free to transition state to NOT_SERVING.
2014-05-04 18:01:34 -07:00
Liang Guo 00d94e7bc7 Merge branch 'master' into liguo 2014-05-02 16:44:56 -07:00
Liang Guo 582c612aa0 Update VTGate V2 2014-05-02 16:44:31 -07:00
Liang Guo a4888296a8 Update VTGate V2 2014-05-02 16:44:07 -07:00