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

47 Коммитов

Автор SHA1 Сообщение Дата
hwdef ff0d02b624 test: update license
Signed-off-by: hwdef <hwdef97@gmail.com>
2019-10-22 13:12:59 +08:00
Anthony Yeh 61b9ba3617 Fix RemoveShardCell to only remove the shard from serving in the specified cell.
It was removing the shard from the serving set in all cells instead of
just one.

Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
2019-06-29 21:22:18 -07:00
Anthony Yeh bffe40a286 Fix RemoveShardCell for non-range-based shards.
KeyRange is `nil` for all non-range-based shards, so this was removing
all non-range-based shards from serving, instead of just the one shard.

Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
2019-06-29 21:18:13 -07:00
Sugu Sougoumarane 3a7ef0e697 mysqlctl: remove lower_case_table_names setting
Issue #3158
The current value of 0 is definitely incorrect because vitess
treats table names as case-sensitive. It's better we don't set
this variable at all. Let the users decide what it should be.
2017-11-13 17:14:51 -08:00
Sugu Sougoumarane 7af23e1dde license: BSD->Apache v2.0
Please refer to #2694 and #2670 for motivation and reasoning for
this change.

I've tried to follow best practice in inserting the copyright
headers. In other open source projects, not all files carry
the notice. For example documentation doesn't. I've followed
similar ground rules.

I did not change the php because there is a separate LICENSE
file there by Pixel Federation. We'll first need to notify
them our intent before changing anything there.

As for the presubmit check, it's going to be non-trivial
because of the number of exceptions, like file types,
directories and generated code. So, it will have to be
a separate project.
2017-05-06 00:38:56 -07:00
Alain Jobart 84d82da92a Making DeleteShard more resilient.
If we can't find a ShardReplication object, fallback to reading all the
tablets in a cell (canonical tablet records) to find potential matches.
Also adding a unit test for that logic.

And adding a new 'even_if_serving' flag to DeleteShard. That way we
won't delete a serving shard by accident.
2016-11-03 10:44:52 -07:00
Anthony Yeh eee9eb6842 replication_reporter: Repair replication even if slave not configured. (#2168)
* replication_reporter: Repair replication even if slave not configured.

It will still only attempt the repair if the global shard record has a
MasterAlias specified.

* tabletmanager: Initializing as master implies replication is allowed.

If the "do not replicate" flag was previously set, initializing a tablet
as master should clear this flag.

* Don't initialize tablets as master in tests.

Initializing a tablet as type master also sets the global shard record's
MasterAlias field. Now that we auto-configure slaves any time this field
is set, it changes the expected serving state for replicas in these
tests.

Rather than just change the expected state in the tests, I updated the
tests to use our new recommended initialization flow: initialize
everything as type replica, and then pick any one of them to be master.
That way you can control the moment at which all slaves first get
configured, when you run InitShardMaster.
2016-10-20 12:59:20 -07:00
Alain Jobart 0f2b311735 Removing lots of RebuildKeyspaceGraph calls.
These are not needed for the serving graph to be up to date any more.
2016-05-31 13:51:47 -07:00
Alain Jobart 2f05afec43 Removing SrvShard. 2016-05-18 07:47:20 -07:00
Alain Jobart d6e826f778 Replacing test usage of GetEndPoints / GetSrvShard
We're going to remove these two from the serving graph soon.
2016-05-13 11:20:00 -07:00
Liang Guo 4f3bfbfd7b Merge branch 'master' into tests 2016-05-11 10:33:21 -07:00
Liang Guo fa6066532b Fix integration tests so they work with other gateway implementation. 2016-05-10 22:29:04 -07:00
Alain Jobart 9f93aaa784 Removing target_tablet_type from tests.
Now always use enable_replication_lag_check. Fix the tests in this
commit to all work properly.
2016-05-10 10:48:47 -07:00
Anthony Yeh 40f41373c8 Fix integration tests for discoverygateway.
Make sure they use healthcheck, and start vtgate after tablets are
ready. Otherwise, you have to wait for the 1min refresh before vtgate
notices the new tablets.
2016-03-02 16:48:21 -08:00
Anthony Yeh 59cd68f07d test/utils: Close grpc connections even with --skip-teardown.
We can't skip closing of grpc connections, or else the Python
interpreter will never exit.
2016-02-17 18:01:26 -08:00
Alain Jobart 5e239b6198 Fixing a few things from comments. 2016-02-01 07:14:33 -08:00
Alain Jobart f5702966cd Fixing lint warning in this test. 2016-01-28 17:38:18 -08:00
Alain Jobart b62b5eb921 Using python vtgate protocol in these tests, explicitely. 2016-01-28 17:30:39 -08:00
Alain Jobart 9b9a3d77d0 Simplifying tests, some easy refactor. 2016-01-28 17:16:41 -08:00
Dean Yasuda 91318ff64d Fix a few more python lint errors. 2015-08-30 22:03:22 -07:00
Dean Yasuda 8be90a9cce Fix some more obvious lint errors in test/*.py. 2015-08-25 22:45:44 -07:00
Dean Yasuda 09a23591a9 Post-merge: fix some simple lint issues on more test/*.py files. 2015-08-25 21:00:52 -07:00
Dean Yasuda 6f1e821634 Make some lint fixes to test/*.py. 2015-08-25 18:54:04 -07:00
Alain Jobart 78d5dc67f0 This test is not using zkocc any more. 2015-08-17 08:42:56 -07:00
Alain Jobart f30d704dfb Now using proto Keyspace structure. 2015-08-03 08:44:21 -07:00
Anthony Yeh a0e0ab1631 Add recursive mode to RemoveShardCell command.
Also add RemoveKeyspaceCell command.
2015-07-09 14:53:07 -07:00
Anthony Yeh 578dfbc0af Add recursive mode to DeleteKeyspace and DeleteShard. 2015-07-09 12:20:07 -07:00
Anthony Yeh 0ef4c35a36 Add DeleteKeyspace command in vtctl.
This cleans up global and cell-local topology entries for a keyspace.
It only works if there are no shards left in the keyspace.
Similarly, DeleteShard only works if there are no tablets left in
the shard.
2015-07-08 16:40:43 -07:00
Anthony Yeh 50f3b13610 Deflake keyspace_test.
There's no need to assert that stderr is empty. The run_vtctl()
function will raise a TestError if the command returns an error code.

This check was making the test flaky because sometimes the spawned
process would emit an incidental log message despite succeeding.
2015-06-29 12:50:01 -07:00
Anthony Yeh 682b1bfb94 Make vtctl print human-readable QueryResults.
The values within each row of a QueryResult were being JSON-encoded as
base64 byte arrays for every type. This JSON encoding was only being
used for tests, until the recent addition of vtctl commands that display
JSON-encoded QueryResults.

Now that we are displaying these to humans, we should display the
results as strings instead of as byte arrays.
2015-06-25 14:57:39 -07:00
Alain Jobart a56aff043f Now using the VtGate object in all tests. 2015-06-04 08:37:20 -07:00
Alain Jobart 8fd2ff4ba3 Changing integration tests to use InitShardMaster. 2015-04-02 09:07:41 -07:00
Alain Jobart 9587099e07 Removing db_types from Keyspace, unused now. 2015-03-16 09:14:36 -07:00
Alain Jobart 16807a416e Now using ShardReferences fields in a few places instead of
Shards in the Keyspace.Partitions map.
2015-03-16 08:42:25 -07:00
Anand Henry 593534912d Travis: Fix flaky tests
Make min rdonly instances configurable for vtworker tasks
Remove unnecessary tablets wherever possible
Use lower buffer pool size in MySQL to save memory
Track performance using New Relic
2014-12-22 14:39:01 -08:00
Anthony Yeh 3ee8a59cf1 Make topo server flavor pluggable in integration tests. 2014-11-14 16:37:05 -08:00
Piotr Kufel 4c74829e8c GetSrvKeyspaceNames command test 2014-10-30 13:31:07 -07:00
Anthony Yeh f5b4ada790 Use #!/usr/bin/env python for integration tests. 2014-10-01 16:38:59 -07:00
Liang Guo 6e74b3c806 Update keyspace.py so not depending on shard order 2014-08-12 20:19:52 -07:00
Liang Guo 88075960c8 Fix keyspace_test 2014-08-08 14:11:35 -07:00
Liang Guo b906aad2db Do not use obsolete SrvKeyspace.Shards 2014-08-08 12:16:19 -07:00
Alain Jobart adf580d81b Adding a GetKeyspace command and test. 2014-05-05 16:15:39 -07:00
shrutip 68df33283f Minor fix to the test name. 2014-02-27 16:02:18 -08:00
shrutip efe519e18c New function in keyspace to return shard_name for keyspace_id. 2014-02-27 15:42:55 -08:00
Liang Guo 291b349e1a Update to avoid massive test change 2014-02-27 14:55:29 -08:00
Liang Guo f3a9644776 Add SSL support in VTGate 2014-02-26 15:10:29 -08:00
shrutip 5f56661fca Added keyspace_test and small fixes to keyspace module. 2014-02-20 13:38:44 -08:00