
It was using maps in each context, which would be merged between contexts, then injected each time we needed a message to display. It had a limitation on complicated operator setups: historical information would be overriden by newer associations. (e.g, that IP was for node0 yesterday, now it's node1, so associations have been overwritten and incorrect) It also introduced complexity, such as forcing to define closures too many times, merging maps, it would be harder to debug, and every files were starting from empty translation maps. Moreover, iterating on maps is guaranteed to be random so it could create hard-to-debug output variations on complex cases. Now it is a singleton in translate package, still using maps but now it associates an array of "units" storing the timestamp with each piece of information. It is protected by rwmutex, because map are not threadsafe. (there's no parallel processing for now) No regressions, and it passes "operator_ambiguous_ips_list_all_no_color" where the old system failed. It nows also can be used as an easy to read source of information in itself
Percona Toolkit
Percona Toolkit is a collection of advanced command-line tools used by Percona support staff to perform a variety of MySQL and system tasks that are too difficult or complex to perform manually.
These tools are ideal alternatives to private or "one-off" scripts because they are professionally developed, formally tested, and fully documented. They are also fully self-contained, so installation is quick and easy and no libraries are installed.
Percona Toolkit is developed and supported by Percona Inc. For more information and other free, open-source software developed by Percona, visit http://www.percona.com/software/.
Installing
To install all tools, run:
perl Makefile.PL
make
make test
make install
You probably need to be root to make install
. On most systems, the tools
are installed in /usr/local/bin. See the INSTALL file for more information.
Documentation
Run man percona-toolkit
to see a list of installed tools, then man tool
to read the embedded documentation for a specific tool. You can also read
the documentation online at http://www.percona.com/software/percona-toolkit/.