The test requires many dependencies which prolong the current test duration by up to 10 minutes on Travis.
Once we figured out how to cache the dependencies both on Travis and our local machines, we can re-enable the test.
Instead of commenting the code for installing the dependencies, I've moved it to bootstrap_web.sh for now.
Changed pattern from preparing dialogs to preparing and opening in one
function.
Added ACL check for vtctl endpoint and schema endpoint.
Seperated the generation of vtctl commands into flags and args.
Better seperated the vtctl service from its clients.
Cleaned up style issues.
If turned on, it will enable the adaptive throttler which throttles the write rate (queries/second) based on the replication lag of all replicas in the same cell.
Changing the Watch API a bit to return a CancelFunc function
instead of relying on the context for cancelation.
Adding unit tests for Watch.
Using the Watch API for WatchSrvKeyspace / WatchSrvVschema.
Retiring the old WatchSrvKeyspace / WatchSrvVschema API.
In the process, adding two new packages:
- memorytopo: an in-memory implementation of topo.Backend.
It uses faketopo for the old-style methods it doesn't implement.
- topotests: unit test for go/vt/topo functions. Because of a circular
dependency (faketopo depends on topo), it can't be with topo until
further refactor / work is done.
Other required changes:
- initialize the module's "lastRateChange" field to the current time
- change all tests to start at 1s instead of 0s to make sure that the code correctly distinguishes between a zero value and a set value
Before this fix, the following sequence was not possible:
- increase by replica1
- decrease or emergency by replica2
- increase by replica2
That was because the module was still locked in to "replica1" and therefore only "replica1" could trigger the next increase.
It will:
- list all active throttlers
=> /throttlerz/
- show details of a throttler
=> /throttlerz/<name>
- show the most recent results of the adapative throttling of a throttler
=> /throttlerz/<name>/log
We're using this object for logging and later also for an HTTP page.
All call sites were changed to update the "Reason" field with a text why the rate was changed or not.
This way it displays more nicely on a web page or in log files.
I've also prefixed the constants with "state" now to clarify that they belong to the "state" type.