- Removed previous Resolver interface and respective implementations.
- Removed respective stat vars and flags (--resolve_ttl).
- Added unit test for case where vtworker fails over to a different replica.
- Added unit test for case when healthcheck retries because currently no master is available.
- Extended FakePoolConnection to support these tests:
- can define callback (AfterFunc) when expected query was received
- infinite mode where the last request may be received over and over again
- discovery: Introduce DefaultTopoReadConcurrency to avoid duplication.
- discovery: Added EndPointStats.Alias() to avoid duplication.
- discovery: Added EndPointStats.String() to have pretty printed arrays.
Adapted end-to-end tests:
- binlog.py, merge_sharding.py, resharding.py: Enabled healthcheck for master tablets.
- worker.py: Updated stat vars check
All vindexes must accept sqltypes.Value because that's
how values are supplied for cross-shard joins.
I've also updated the example and the v3 e2e test.
In the process, re-factoring utils.wait_for_vars so it can also take a
key and value, and therefore can be used by a
VtGate.wait_for_endpoints() method. Using that method in a few tests
instead of custom cut&paste code.
Creating a new base class for sharding tests.
Using it in initial_sharding, merge_sharding, resharding and
vertical_split. Adding consistent checks in all of these.
Refactoring them to all match (all_tablets list at beginning, ...).
Also fixing a reporting bug in binlog server, the wrong var was used
for update stream. Actually found this with the tests!
vtgateclienttest has to register services in 'OnRun',
instead of right away, as the gRPC server is not created yet.
Various fixes related to socket file. We were wrongly assuming
we needed the gRPC server when a port is specified, forgetting
the unix socket case. Refactoring the unix socket case to be
better aligned with gRPC code.
Now extract the gRPC TLS certificate name the client used,
and use that as immediate caller id. When table ACLs are used,
this in effect propagates the certificate name as the client name.
Adding a simple unit test case in secure_transport.py: one vtgate
client cert is allowed to access the test table, another in not.
(also fixing doc for format of table acl config file).
The server side takes a cert and key, and a ca to verify clients.
The client side takes a cert and key, a ca to verify the server,
and an optional server name in case the server host name does not
match the certificate name.
Renaming secure.py to be more descriptive.
Added end-to-end test in worker.py which verifies that --min_healthy_rdonly_endpoints works correctly when there are not enough RDONLY tablets.
Updated tests and documentation.
If a tablet has blacklisted table rules that don't match
any existing tables, don't blacklist exverything.
In the process, allowing schema changes on databases with views,
as the integration test needs it, and it's a good fix anyway.