mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-02 18:45:57 +00:00
Compare commits
52 Commits
PMM-7116_i
...
pmm-2.32.0
Author | SHA1 | Date | |
---|---|---|---|
![]() |
873a18a589 | ||
![]() |
163346302b | ||
![]() |
f04a325b75 | ||
![]() |
fa040958ed | ||
![]() |
7fd3828ef7 | ||
![]() |
a4c454d4c5 | ||
![]() |
b8a28a2150 | ||
![]() |
f78e75d391 | ||
![]() |
d63e16f7d4 | ||
![]() |
d881738e2f | ||
![]() |
cae3c7be0a | ||
![]() |
d4dec7599b | ||
![]() |
5cdb98b487 | ||
![]() |
8519e103ad | ||
![]() |
89f60d4a94 | ||
![]() |
42bd1ed9d5 | ||
![]() |
ed6ce6b50a | ||
![]() |
a490203471 | ||
![]() |
670e1159bf | ||
![]() |
3243008c59 | ||
![]() |
9837bbdd2e | ||
![]() |
eaa95fd0e5 | ||
![]() |
957451a707 | ||
![]() |
e5cb95130d | ||
![]() |
70fd5a71b2 | ||
![]() |
c669972622 | ||
![]() |
9c00264e24 | ||
![]() |
2cb94372d5 | ||
![]() |
0bb5d6b6fb | ||
![]() |
102a3dd838 | ||
![]() |
10fbe64649 | ||
![]() |
8a4acd6201 | ||
![]() |
a5fe94e4af | ||
![]() |
a556d09895 | ||
![]() |
0d39dd1e3d | ||
![]() |
2760e8c927 | ||
![]() |
22ed941238 | ||
![]() |
40f179cf26 | ||
![]() |
3767e57e15 | ||
![]() |
9427c16314 | ||
![]() |
623fdaec91 | ||
![]() |
1f6c95f524 | ||
![]() |
d6e899404e | ||
![]() |
5a46d3df77 | ||
![]() |
1c725e94e6 | ||
![]() |
037b6ed502 | ||
![]() |
b2860eee31 | ||
![]() |
fde683fb5d | ||
![]() |
a019907e6e | ||
![]() |
60ed28ab31 | ||
![]() |
16716b3a7b | ||
![]() |
c5a22407a7 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -12,6 +12,7 @@ Makefile.old
|
||||
bin/pt-mongodb-*
|
||||
bin/pt-secure-*
|
||||
bin/pt-pg-*
|
||||
bin/pt-k8s-debug-collector
|
||||
!src/go/pt-mongodb-query-digest/vendor/vendor.json
|
||||
!src/go/pt-mongodb-summary/vendor/vendor.json
|
||||
src/go/pt-mongodb-query-digest/vendor/
|
||||
@@ -25,4 +26,4 @@ config/deb/control.bak
|
||||
config/rpm/percona-toolkit.spec.bak
|
||||
config/sphinx-build/percona-theme/*
|
||||
coverage.out
|
||||
.idea
|
||||
.idea
|
||||
|
@@ -1,8 +1,7 @@
|
||||
language: go
|
||||
|
||||
go:
|
||||
- 1.15.x
|
||||
- 1.14.x
|
||||
- 1.17.x
|
||||
- tip
|
||||
|
||||
services:
|
||||
|
24
.whitesource
Normal file
24
.whitesource
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"scanSettings": {
|
||||
"configMode": "AUTO",
|
||||
"configExternalURL": "",
|
||||
"projectToken": "",
|
||||
"baseBranches": [],
|
||||
"enableLicenseViolations": true
|
||||
},
|
||||
"checkRunSettings": {
|
||||
"vulnerableCheckRunConclusionLevel": "failure",
|
||||
"displayMode": "diff"
|
||||
},
|
||||
"issueSettings": {
|
||||
"minSeverityLevel": "NONE"
|
||||
},
|
||||
"remediateSettings": {
|
||||
"enableRenovate": false,
|
||||
"dependencyDashboard": true,
|
||||
"extends": [
|
||||
"github>whitesource/merge-confidence:beta",
|
||||
"github>samq-ghdemo/renovate:demo"
|
||||
]
|
||||
}
|
||||
}
|
339
CONTRIBUTE.md
339
CONTRIBUTE.md
@@ -1,149 +1,190 @@
|
||||
# Contributing guide
|
||||
## How Can I Contribute?
|
||||
## Reporting Bugs
|
||||
Before creating bug reports, please check this list as you might find out that you don't need to create one. When you create a bug report, please include as many details as possible. You can use this template to structure the information.
|
||||
|
||||
### Before Submitting A Bug Report
|
||||
- Ensure you have carefully read the documentation. Percona Toolkit is a mature project with many settings that covers a wide range options.
|
||||
- Search for existing bugs in Launchpad to see if the problem has already been reported. If it has, add a comment to the existing issue instead of opening a new one.
|
||||
|
||||
### How Do I Submit A (Good) Bug Report?
|
||||
- Explain the problem and include additional details to help others reproduce the problem:
|
||||
- Use a clear and descriptive title for the issue to identify the problem.
|
||||
- Describe the exact steps which reproduce the problem, including as many details as possible. Provide examples of the command you used and include context information like language, OS and database versions.
|
||||
Describe the obtained results and the expected results and, if it is possible, provide examples.
|
||||
|
||||
## Submiting fixes
|
||||
### Create an Issue
|
||||
If you find a bug, the first step is to create an issue. Whatever the problem is, you’re likely not the only one experiencing it. Others will find your issue helpful, and other developers might help you find the cause and discuss the best solution for it.
|
||||
|
||||
#### Tips for creating an issue
|
||||
- Check if there are any existing issues for your problem. By doing this, we can avoid duplicating efforts, since the issue might have been already reported and if not, you might find useful information on older issues related to the same problem.
|
||||
- Be clear about what your problem is: which program were you using, what was the expected result and what is the result you are getting. Detail how someone else can reproduce the problem, including examples.
|
||||
- Include system details like language version, OS, database details or special configurations, etc.
|
||||
- Paste the error output or logs in your issue or in a Gist.
|
||||
|
||||
### Pull Requests
|
||||
If you fixed a bug or added a new feature – awesome! Open a pull request with the code! Be sure you’ve read any documents on contributing, understand the license and have signed a Contributor Licence Agreement (CLA) if required. Once you’ve submitted a pull request, the maintainers can compare your branch to the existing one and decide whether or not to incorporate (merge) your changes.
|
||||
|
||||
### Tips for creating a pull request
|
||||
- Fork the repository and clone it locally. Connect your local to the original ‘upstream’ repository by adding it as a remote. Pull in changes from ‘upstream’ often so that you stay up to date so that when you submit your pull request, merge conflicts will be less likely.
|
||||
- Create a branch for your code. Usually it is a good practice to name the branch after the issue ID, like issue-12345.
|
||||
- Be clear about the problem you fixed or the feature you added. Include explanations and code references to help the maintainers understand what you did.
|
||||
- Add useful comments to the code to help others understand it.
|
||||
- Write tests. This is an important step. Run your changes against existing tests and create new ones when needed. Whether tests exist or not, make sure your changes don’t break the existing project.
|
||||
- Contribute in the style of the project to the best of your abilities. This may mean using indents, semicolons, or comments differently than you would in your own repository, but makes it easier for the maintainer to merge, others to understand and maintain in the future.
|
||||
- Keep your changes as small as possible and solve only what's reported in the issue. Mixing fixes might be confusing to others and makes testing harder.
|
||||
- Be as explicit as possible. Avoid using special/internal language variables like $_. Use a variable name that clearly represents the value it holds.
|
||||
- Write good commit messages. A comment like 'Misc bugfixes' or 'More code added' does not help to understand what's the change about.
|
||||
|
||||
### Open Pull Requests
|
||||
Once you’ve opened a pull request, a discussion will start around your proposed changes. Other contributors and users may chime in, but ultimately the decision is made by the maintainers. You may be asked to make some changes to your pull request, if so, add more commits to your branch and push them – they’ll automatically go into the existing pull request.
|
||||
|
||||
# Licensing
|
||||
Along with the pull request, include a message indicating that the submited code is your own creation and it can be distributed under the BSD licence.
|
||||
|
||||
|
||||
# Setting up the development environment
|
||||
|
||||
#### Setting up the source code
|
||||
To start, fork the Percona Toolkit repo to be able to submit pull requests and clone it locally:
|
||||
```
|
||||
mkdir ${HOME}/perldev
|
||||
git clone https://github.com/<your-username>/percona-toolkit.git ${HOME}/perldev/percona-toolkit
|
||||
```
|
||||
|
||||
For testing, we are going to need to have MySQL with slaves. For that, we already have scripts in the sandbox directory but first we need to download MySQL binaries. Please download the Linux Generic tar file for your distrubution from [https://www.percona.com/downloads/Percona-Server-5.6/](https://www.percona.com/downloads/Percona-Server-5.6/).
|
||||
|
||||
### Set up MySQL sandbox
|
||||
In this example, we are going to download Percona Server 5.6.32. Since I am using Ubuntu, according to the documentation [here](https://www.percona.com/doc/percona-server/5.6/installation.html#installing-percona-server-from-a-binary-tarball), I am going to need this tar file: [Percona-Server-5.6.32-rel78.1-Linux.x86_64.ssl100.tar.gz](https://www.percona.com/downloads/Percona-Server-5.6/Percona-Server-5.6.32-78.1/binary/tarball/Percona-Server-5.6.32-rel78.1-Linux.x86_64.ssl100.tar.gz).
|
||||
|
||||
```
|
||||
mkdir -p ${HOME}/mysql/percona-server-5.6.32
|
||||
```
|
||||
```
|
||||
wget https://www.percona.com/downloads/Percona-Server-5.6/Percona-Server-5.6.32-78.1/binary/tarball/Percona-Server-5.6.32-rel78.1-Linux.x86_64.ssl100.tar.gz
|
||||
```
|
||||
```
|
||||
tar xvzf Percona-Server-5.6.32-rel78.1-Linux.x86_64.ssl100.tar.gz --strip 1 -C ${HOME}/mysql/percona-server-5.6.32
|
||||
```
|
||||
### Set up environment variables
|
||||
We need these environment variables to start the MySQL sandbox and to run the tests. Probably it is a good idea to add them to your `.bashrc` file.
|
||||
```
|
||||
export PERCONA_TOOLKIT_BRANCH=${HOME}/perldev/percona-toolkit
|
||||
export PERL5LIB=${HOME}/perldev/percona-toolkit/lib
|
||||
export PERCONA_TOOLKIT_SANDBOX=${HOME}/mysql/percona-server-5.6.32
|
||||
```
|
||||
|
||||
### Check that all needed tools are correctly installed:
|
||||
```
|
||||
util/check-dev-env
|
||||
```
|
||||
If not, you will have to either install them via your package manager of preference, or using Perl directly. For example, let's assume that you are missing the `File::Slurp` package (as flagged by a `NA` output from the previous command), you can use:
|
||||
```
|
||||
sudo perl -MCPAN -e "shell"
|
||||
cpan[1]> install File::Slurp
|
||||
...
|
||||
```
|
||||
|
||||
### Starting the sandbox
|
||||
```
|
||||
cd ${HOME}/perldev/percona-toolkit
|
||||
```
|
||||
```
|
||||
sandbox/test-env start
|
||||
```
|
||||
To stop the MySQL sandbox: `sandbox/test-env stop`
|
||||
To enable TokuDB (only available in Percona Server 5.7+), run:
|
||||
|
||||
```
|
||||
ENABLE_TOKUDB=1 sandbox/test-env start
|
||||
```
|
||||
|
||||
### Running tests
|
||||
```
|
||||
cd ${HOME}/perldev/percona-toolkit
|
||||
```
|
||||
Run all tests for a particular program (pt-stalk in this example):
|
||||
```
|
||||
prove -v t/pt-stalk/
|
||||
```
|
||||
You can also add warnings with:
|
||||
```
|
||||
prove -vw t/pt-stalk/
|
||||
```
|
||||
or run a specific test:
|
||||
```
|
||||
prove -v t/pt-stalk/option_sanity.t
|
||||
```
|
||||
|
||||
# Introducing changes to the toolkit
|
||||
|
||||
## Creating a new branch
|
||||
|
||||
You should start your own development branch. If you have a JIRA ticket assigned, use its number as reference, and add a short description of what work on this branch will do:
|
||||
```
|
||||
git checkout -b PT-9999_functionality_name
|
||||
```
|
||||
The first commit should also have the JIRA reference number as first characters in the commit message (so that JIRA can use the smart tags).
|
||||
|
||||
## Running the update-modules tool
|
||||
|
||||
Whenever you make changes to libraries under lib/, you should make sure that you run the util/update-modules functionality, to make sure that all tools that use these packages will benefit from the new changes. For example, let's say you changed the lib/bash/collect.sh package, you will need to run:
|
||||
```
|
||||
cd ${HOME}/perldev/percona-toolkit
|
||||
for t in bin/*; do util/update-modules ${t} collect; done
|
||||
```
|
||||
Or if you changed the lib/NibbleIterator.pm package:
|
||||
```
|
||||
cd ${HOME}/perldev/percona-toolkit
|
||||
for t in bin/*; do util/update-modules ${t} NibbleIterator; done
|
||||
```
|
||||
|
||||
## Uploading your branch
|
||||
|
||||
Finally, after you run another round of tests and everything is ok, you should upload your branch to your GitHub fork:
|
||||
```
|
||||
git push origin PT-9999_functionality_name
|
||||
```
|
||||
And then go to the web UI to create the new pull request (PR) based off of this new branch.
|
||||
# Contributing Guide
|
||||
## How Can I Contribute?
|
||||
## Reporting Bugs
|
||||
Before creating bug reports, please check [this list](https://jira.percona.com/projects/PT/issues) as you might find out that you don't need to create one. When you create a bug report, please include as many details as possible. You can use [this guide](https://www.percona.com/blog/2019/06/12/report-bugs-improvements-new-feature-requests-for-percona-products/) to structure the information.
|
||||
|
||||
### Before Submitting a Bug Report
|
||||
- Ensure you have carefully read the documentation. Percona Toolkit is a mature project with many settings that cover a wide range of options.
|
||||
- Search for existing bugs in [Jira](https://jira.percona.com) to see if the problem has already been reported. If it has, add a comment to the existing issue instead of opening a new one.
|
||||
By doing this, we can avoid duplicating efforts, since the issue might have been already reported and if not, you might find useful information on older issues related to the same problem.
|
||||
|
||||
### How Do I Submit a (Good) Bug Report?
|
||||
- Explain the problem and include additional details to help others to reproduce the problem.
|
||||
- Use a clear and descriptive title for the issue.
|
||||
- Be clear about what your problem is: which program you are using, what is the expected result and what is the result you are getting.
|
||||
- Include system details, such as language version, OS, database details or special configurations, etc.
|
||||
- Describe the exact steps which reproduce the problem, including as many details as possible. Provide examples of the command you used and include context information like language, OS and database versions.
|
||||
- Describe the obtained and the expected results and, if possible, provide examples.
|
||||
- Paste the error output or logs into Jira issue or attach them. You may put large files on our SFTP server if needed. Use Jira issue number as a login and password for the [Percona SFTP server](sftp.percona.com). Have Jira issue number in the file name and add a comment, so we can access it.
|
||||
|
||||
## Reporting Documentation Issues
|
||||
Documentation bugs for Percona Toolkit should be reported at [Percona Jira](https://jira.percona.com/) in the project **PT** and have component **Documentation**.
|
||||
|
||||
### Good Documentation Bug Report
|
||||
- Contains link to the user manual page where the documentation is wrong
|
||||
- Fully explains the problem
|
||||
- Optionally explains how documentation should be fixed
|
||||
|
||||
## Introducing Changes to the Toolkit
|
||||
### Set Up the Source Code
|
||||
To start, fork the Percona Toolkit repo to be able to submit pull requests and clone it locally:
|
||||
```
|
||||
mkdir ${HOME}/perldev
|
||||
git clone https://github.com/percona/percona-toolkit.git ${HOME}/perldev/percona-toolkit
|
||||
```
|
||||
### Create a New Branch
|
||||
|
||||
You should start your own development branch. If you have a Jira ticket assigned, use its number as a reference, and add a short description of what work on this branch will do:
|
||||
```
|
||||
git checkout -b PT-9999_functionality_name
|
||||
```
|
||||
The first commit should also have the Jira reference number as first characters in the commit message (so that Jiraf can use the smart tags).
|
||||
|
||||
### Example Commit Message
|
||||
|
||||
```
|
||||
PT-12345 - fixed data corruption issue for pt-foo
|
||||
|
||||
New check pt-foo-test-env added when pt-foo is going to perform destructive operation.
|
||||
If check fails, now pt-foo will stop executing and return an error.
|
||||
```
|
||||
|
||||
### Changing Shared Code
|
||||
|
||||
Percona Toolkit uses `lib` directory for library code. Once you change it you need to run the `update-modules` tool that will merge module code with the tools. Be careful and **do not modify** anything between the `This package is a copy without comments from the original` and `End ... package` comments.
|
||||
|
||||
### Running the update-modules Tool
|
||||
|
||||
Whenever you make changes to libraries under `lib/`, you should make sure that you run the `util/update-modules` functionality, to make sure that all tools that use these packages will benefit from the new changes. For example, let's say you changed the `lib/bash/collect.sh` package, you will need to run:
|
||||
```
|
||||
cd ${HOME}/perldev/percona-toolkit
|
||||
for t in bin/*; do util/update-modules ${t} collect; done
|
||||
```
|
||||
Or if you changed the `lib/NibbleIterator.pm` package:
|
||||
```
|
||||
cd ${HOME}/perldev/percona-toolkit
|
||||
for t in bin/*; do util/update-modules ${t} NibbleIterator; done
|
||||
```
|
||||
|
||||
## Uploading Your Branch
|
||||
|
||||
Finally, after you run another round of tests and everything is OK, you should upload your branch to your GitHub fork:
|
||||
```
|
||||
git push origin PT-9999_functionality_name
|
||||
```
|
||||
And then go to the web UI to create the new pull request (PR) based off of this new branch.
|
||||
|
||||
## Submiting Fixes
|
||||
### Pull Requests
|
||||
Once your fix is ready and you pushed it into the feature branch, open a pull request with the code. Be sure you’ve read any documents on contributing, understand the license and have signed a [Contributor Licence Agreement (CLA)](https://github.com/percona/percona-toolkit/blob/3.x/CONTRIBUTING.md). Once you’ve submitted a pull request, the maintainers can compare your branch to the existing one and decide whether or not to incorporate (merge) your changes.
|
||||
|
||||
### Tips for Creating a Pull Request
|
||||
- Be clear about the problem you fixed or the feature you added. Include explanations and code references to help the maintainers understand what you did.
|
||||
- Add useful comments to the code to help others understand it.
|
||||
- Write tests. This is an important step. Run your changes against existing tests and create new ones when needed. Whether tests exist or not, make sure your changes don’t break the existing project.
|
||||
- Contribute in the style of the project to the best of your abilities. This may mean using indents, semicolons, or comments differently than you would in your own repository, but makes it easier for the maintainer to merge, others to understand and maintain in the future.
|
||||
- Keep your changes as small as possible and solve only what's reported in the issue. Mixing fixes might be confusing to others and makes testing harder.
|
||||
- Be as explicit as possible. Avoid using special/internal language variables like `$_`. Use a variable name that clearly represents the value it holds.
|
||||
- Write good commit messages. A comment like *'Misc bugfixes'* or *'More code added'* does not help to understand what's the change about.
|
||||
- Put Jira issue number into the commit message to automatically link it with the Jira issue.
|
||||
|
||||
### Open a Pull Request
|
||||
Once you’ve opened a pull request, a discussion will start around your proposed changes. Other contributors and users may chime in, but ultimately the decision is made by the maintainers. You may be asked to make some changes to your pull request, if so, add more commits to your branch and push them – they’ll automatically go into the existing pull request.
|
||||
|
||||
## Licensing
|
||||
Along with the pull request, include a message indicating that the submited code is your own creation and it can be distributed under the GPL2 licence.
|
||||
|
||||
|
||||
## Setting up the Development Environment and Testing
|
||||
### Perl and Shell Tools
|
||||
For testing, we are going to need to have MySQL with replicas. For that, we already have scripts in the sandbox directory but first we need to download MySQL binaries. Please download the Linux Generic tar file for your distrubution from [https://www.percona.com/downloads/Percona-Server-LATEST/](https://www.percona.com/downloads/Percona-Server-LATEST/).
|
||||
|
||||
#### Set up MySQL Sandbox
|
||||
In this example, we are going to download Percona Server 8.0.26-17.
|
||||
|
||||
```
|
||||
mkdir -p ${HOME}/mysql/percona-server-8.0.26-17
|
||||
```
|
||||
```
|
||||
wget https://downloads.percona.com/downloads/Percona-Server-LATEST/Percona-Server-8.0.26-17/binary/tarball/Percona-Server-8.0.26-17-Linux.x86_64.glibc2.17.tar.gz
|
||||
```
|
||||
```
|
||||
tar xvzf Percona-Server-8.0.26-17-Linux.x86_64.glibc2.17.tar.gz --strip 1 -C ${HOME}/mysql/percona-server-8.0.26-17
|
||||
```
|
||||
#### Set Up Environment Variables
|
||||
We need these environment variables to start the MySQL sandbox and to run the tests. Probably it is a good idea to add them to your `.bashrc` file.
|
||||
```
|
||||
export PERCONA_TOOLKIT_BRANCH=${HOME}/perldev/percona-toolkit
|
||||
export PERL5LIB=${HOME}/perldev/percona-toolkit/lib
|
||||
export PERCONA_TOOLKIT_SANDBOX=${HOME}/mysql/percona-server-8.0.26-17
|
||||
```
|
||||
|
||||
#### Check That All Needed Tools Are Correctly Installed:
|
||||
```
|
||||
util/check-dev-env
|
||||
```
|
||||
If not, you will have to either install them via your package manager of preference, or using Perl directly. For example, let's assume that you are missing the `File::Slurp` package (as flagged by a `NA` output from the previous command), you can use:
|
||||
```
|
||||
sudo perl -MCPAN -e "shell"
|
||||
cpan[1]> install File::Slurp
|
||||
...
|
||||
```
|
||||
|
||||
#### Starting the Sandbox
|
||||
```
|
||||
cd ${HOME}/perldev/percona-toolkit
|
||||
```
|
||||
```
|
||||
sandbox/test-env start
|
||||
```
|
||||
To stop the MySQL sandbox: `sandbox/test-env stop`
|
||||
To enable TokuDB (only available in Percona Server 5.7+), run:
|
||||
|
||||
```
|
||||
ENABLE_TOKUDB=1 sandbox/test-env start
|
||||
```
|
||||
|
||||
To enable MyRocks (only available in Percona Server 5.7+), run:
|
||||
|
||||
```
|
||||
ENABLE_ROCKSDB=1 sandbox/test-env start
|
||||
```
|
||||
|
||||
#### Running Tests
|
||||
```
|
||||
cd ${HOME}/perldev/percona-toolkit
|
||||
```
|
||||
Run all tests for a particular program (pt-stalk in this example):
|
||||
```
|
||||
prove -v t/pt-stalk/
|
||||
```
|
||||
You can also add warnings with:
|
||||
```
|
||||
prove -vw t/pt-stalk/
|
||||
```
|
||||
or run a specific test:
|
||||
```
|
||||
prove -v t/pt-stalk/option_sanity.t
|
||||
```
|
||||
|
||||
### Go Tools
|
||||
|
||||
Starting from version 3, there are new tools for MongoDB, written in Go language.
|
||||
|
||||
To test these tools, first switch to the `src/go` directory, then use command `make`.
|
||||
|
||||
#### Starting the Sandbox
|
||||
|
||||
Run command `make env-up`. This will start MongoDB container cluster
|
||||
|
||||
#### Build Mongo Tools
|
||||
|
||||
Run command `make` with your environment as a parameter. For example, `make linux-amd64` will build Mongo tools for Linux AMD64 platform.
|
||||
|
||||
#### Running Tests
|
||||
|
||||
Run `make test`
|
||||
|
||||
#### Stopping the Sandbox
|
||||
|
||||
Run `make env-down`
|
53
Changelog
53
Changelog
@@ -1,9 +1,38 @@
|
||||
Changelog for Percona Toolkit
|
||||
|
||||
* Improvement PT-1974: Support fingerprinting for --print in pt-kill (Thanks Iwo Panowicz)
|
||||
* Fixed bug PT-1966: Fixed test (Thanks @yoku0825)
|
||||
* Fixed bug PT-1965: pt-stalk --mysql-only doesn't collect mysqladmin outputs (Thanks Sergey Kuzmichev)
|
||||
v3.4.0 release 2022-07-11
|
||||
|
||||
* New Tool PT-1978: Add reporting on unused/redundant indexes for MongoDB by pt-mongodb-summary
|
||||
* Improvement PT-1417: Inconsistent creation of toolkit tables
|
||||
* Improvement PT-1800: The environment variable PTDEBUG=1 exposes the passwords
|
||||
* Improvement PT-1940: ptsoc dropswap method that was rejected for Mysql 8 has been fixed with Mysql 8.0.14
|
||||
* Improvement PT-1979: Add gathering of admin parameters for MongoDB by pt-mongodb-summary
|
||||
* Improvement PT-2037: Add option --skip-mysql or --system-only for pt-stalk
|
||||
* Fixed bug PT-1218: pt-stalk ominous open_tables function
|
||||
* Fixed bug PT-1336: pt-stalk removes user's files from the destination directory
|
||||
* Fixed bug PT-1398: pt-stalk gets the incorrect mysqld pid when the host installed a multi MySQL instance
|
||||
* Fixed bug PT-1627: pt-mysql-summary doesn't verify which version of jemalloc is in use
|
||||
* Fixed bug PT-1747: pt-online-schema-change: metadata lock can break database for rebuild_constraints
|
||||
* Fixed bug PT-1887: pt-diskstat is not working for new kernels
|
||||
* Fixed bug PT-1900: At times, pt-query-digest does not hide the parameters properly when parameter=binary
|
||||
* Fixed bug PT-1953: pt-summary typo: Memory mamagement.
|
||||
* Fixed bug PT-1959: go part of the toolkit still has the version 3.3.0
|
||||
* Fixed bug PT-1965: pt-stalk --mysql-only doesn't collect mysqladmin output (Thanks Sergey Kuzmichev)
|
||||
* Fixed bug PT-1966: Test no_drop_no_swap for the pt-online-schema-change is broken (Thanks Tsubasa Tanaka)
|
||||
* Fixed bug PT-1974: Support fingerprinting for --print in pt-kill
|
||||
* Fixed bug PT-1983: pt-summary missing one DIMM
|
||||
* Fixed bug PT-2016: pt-table-checksum fails to build replace query when table lacks primary key
|
||||
* Fixed bug PT-2023: pt-upgrade Error: Wide character in print
|
||||
|
||||
v3.3.1 release 2021-04-28
|
||||
|
||||
* Fixed bug PT-716 : pt-summary reports wrong memory size
|
||||
* Fixed bug PT-1914: Column data lost when 'Generated' is in the column comment
|
||||
* Fixed bug PT-1919: pt-online-schema change drop_swap can lose triggers. (Thanks Bob)
|
||||
* Fixed bug PT-1943: BEFORE triggers are dropped after pt-online-schema-change run
|
||||
|
||||
v3.3.0 release 2021-01-14
|
||||
|
||||
* Improvement PT-1940: Added mysql version check for bug fix introduced in 8.0.14 (Thanks duxthefux)
|
||||
* Fixed bug PT-1919: pt-online-schema change drop_swap can lose triggers. (Thanks Bob)
|
||||
* Fixed bug PT-1914: Column data lost when 'Generated' is in the column comment
|
||||
@@ -12,17 +41,17 @@ Changelog for Percona Toolkit
|
||||
|
||||
v3.3.0 release 2021-01-14
|
||||
|
||||
* Fixed bug PT-1857: pt-heartbeat cannot reconnect.
|
||||
* Fixed bug PT-169 : pt-online-schema-change FKs error handling.
|
||||
* Fixed bug PT-1892: pt-summary says sshd not running
|
||||
* Fixed bug PT-1881: pt-upgrade fails when query including format strings and SQL errors is given (Thanks Nayuta Yanagisawa)
|
||||
* Fixed bug PT-1859: pt-pg-summary fails for Postgres12 (Thanks Sergey Kuzmichev)
|
||||
* Improvement PT-1853: Added --no-check-foreing-keys to pt-osc
|
||||
* Improvement PT-1851: Backslashes missing from documentation
|
||||
* Improvement PT-1836: Review and consider lintian reported issues
|
||||
* Fixed bug PT-1829: pt-heartbeat doesn't reconnect for check-read-only
|
||||
* Fixed bug PT-1822: pt-mongodb-summary fails on standalone mongodb instances
|
||||
* Fixed bug PT-1518: pt-table-checksum gives error CRC32. (Thanks @ovidiustanila)
|
||||
* Fixed bug PT-1822: pt-mongodb-summary fails on standalone mongodb instances
|
||||
* Fixed bug PT-1829: pt-heartbeat doesn't reconnect for check-read-only
|
||||
* Improvement PT-1836: Review and consider lintian reported issues
|
||||
* Improvement PT-1851: Backslashes missing from documentation
|
||||
* Improvement PT-1853: Added --no-check-foreing-keys to pt-osc
|
||||
* Fixed bug PT-1857: pt-heartbeat cannot reconnect.
|
||||
* Fixed bug PT-1859: pt-pg-summary fails for Postgres12 (Thanks Sergey Kuzmichev)
|
||||
* Fixed bug PT-1881: pt-upgrade fails when query including format strings and SQL errors is given (Thanks Nayuta Yanagisawa)
|
||||
* Fixed bug PT-1892: pt-summary says sshd not running
|
||||
|
||||
v3.2.0 release 2020-04-23
|
||||
|
||||
|
@@ -2,16 +2,16 @@ use ExtUtils::MakeMaker;
|
||||
|
||||
WriteMakefile(
|
||||
NAME => 'percona-toolkit',
|
||||
VERSION => '3.3.1',
|
||||
VERSION => '3.4.0',
|
||||
EXE_FILES => [ <bin/*> ],
|
||||
MAN1PODS => {
|
||||
'docs/percona-toolkit.pod' => 'blib/man1/percona-toolkit.1p',
|
||||
map {
|
||||
(my $name = $_) =~ s/^bin.//;
|
||||
my $file_name = $_;
|
||||
if ( $file_name !~ m/mongo/ ) {
|
||||
if ( ( $file_name !~ m/mongo/ ) || ( $file_name !~ m/pg/ ) ) {
|
||||
$_ => "blib/man1/$name.1p";
|
||||
}
|
||||
}
|
||||
} <bin/*>
|
||||
},
|
||||
MAN3PODS => {}, # man(3) pages are for C libs
|
||||
|
18
README.md
18
README.md
@@ -33,21 +33,3 @@ are installed in /usr/local/bin. See the INSTALL file for more information.
|
||||
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/](http://www.percona.com/software/percona-toolkit/).
|
||||
|
||||
## Version 3
|
||||
|
||||
Starting from version 3, there are new tools for MongoDB. These tools are written in Go so
|
||||
in order to compile these program, this repo must me cloned into the GOPATH directory.
|
||||
Example:
|
||||
|
||||
```
|
||||
mkdir ${HOME}/go
|
||||
export GOPATH=${HOME}/go
|
||||
mkdir -p ${HOME}/go/src/github.com/percona
|
||||
cd ${HOME}/go/src/github.com/percona
|
||||
git clone https://github.com/percona/percona-toolkit.git
|
||||
cd percona-toolkit/src/go
|
||||
make
|
||||
```
|
||||
|
||||
|
||||
|
@@ -1364,6 +1364,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-align 3.3.2
|
||||
pt-align 3.4.0
|
||||
|
||||
=cut
|
||||
|
@@ -8661,6 +8661,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-archiver 3.3.2
|
||||
pt-archiver 3.4.0
|
||||
|
||||
=cut
|
||||
|
@@ -5917,6 +5917,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-config-diff 3.3.2
|
||||
pt-config-diff 3.4.0
|
||||
|
||||
=cut
|
||||
|
@@ -5710,6 +5710,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-deadlock-logger 3.3.2
|
||||
pt-deadlock-logger 3.4.0
|
||||
|
||||
=cut
|
||||
|
@@ -2243,8 +2243,10 @@ sub parse_diskstats_line {
|
||||
# linux kernel source => Documentation/iostats.txt
|
||||
# 2.6+ => 14 fields
|
||||
# 4.18+ => 18 fields
|
||||
# 5.x+ => 20 fields (PT-1887)
|
||||
my @num_fields = (14, 18, 20);
|
||||
my @dev_stats = split ' ', $line;
|
||||
return unless @dev_stats == 14 or @dev_stats == 18;
|
||||
return unless grep {$_ == scalar(@dev_stats)} @num_fields;
|
||||
|
||||
my $read_bytes = $dev_stats[READ_SECTORS] * $block_size;
|
||||
my $written_bytes = $dev_stats[WRITTEN_SECTORS] * $block_size;
|
||||
@@ -5682,6 +5684,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-diskstats 3.3.2
|
||||
pt-diskstats 3.4.0
|
||||
|
||||
=cut
|
||||
|
@@ -5771,6 +5771,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-duplicate-key-checker 3.3.2
|
||||
pt-duplicate-key-checker 3.4.0
|
||||
|
||||
=cut
|
||||
|
@@ -1653,6 +1653,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-fifo-split 3.3.2
|
||||
pt-fifo-split 3.4.0
|
||||
|
||||
=cut
|
||||
|
@@ -5132,6 +5132,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-find 3.3.2
|
||||
pt-find 3.4.0
|
||||
|
||||
=cut
|
||||
|
@@ -2262,6 +2262,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-fingerprint 3.3.2
|
||||
pt-fingerprint 3.4.0
|
||||
|
||||
=cut
|
||||
|
@@ -4693,6 +4693,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-fk-error-logger 3.3.2
|
||||
pt-fk-error-logger 3.4.0
|
||||
|
||||
=cut
|
||||
|
@@ -7394,6 +7394,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-heartbeat 3.3.2
|
||||
pt-heartbeat 3.4.0
|
||||
|
||||
=cut
|
||||
|
@@ -7705,6 +7705,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-index-usage 3.3.2
|
||||
pt-index-usage 3.4.0
|
||||
|
||||
=cut
|
||||
|
@@ -1132,7 +1132,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-ioprofile 3.3.2
|
||||
pt-ioprofile 3.4.0
|
||||
|
||||
=cut
|
||||
|
||||
|
@@ -8576,6 +8576,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-kill 3.3.2
|
||||
pt-kill 3.4.0
|
||||
|
||||
=cut
|
||||
|
@@ -809,7 +809,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-mext 3.3.2
|
||||
pt-mext 3.4.0
|
||||
|
||||
=cut
|
||||
|
||||
|
@@ -3296,7 +3296,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-mysql-summary 3.3.2
|
||||
pt-mysql-summary 3.4.0
|
||||
|
||||
=cut
|
||||
|
||||
|
@@ -13469,6 +13469,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-online-schema-change 3.3.2
|
||||
pt-online-schema-change 3.4.0
|
||||
|
||||
=cut
|
||||
|
@@ -901,7 +901,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-pmp 3.3.2
|
||||
pt-pmp 3.4.0
|
||||
|
||||
=cut
|
||||
|
||||
|
@@ -16977,6 +16977,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-query-digest 3.3.2
|
||||
pt-query-digest 3.4.0
|
||||
|
||||
=cut
|
||||
|
@@ -2618,6 +2618,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-show-grants 3.3.2
|
||||
pt-show-grants 3.4.0
|
||||
|
||||
=cut
|
||||
|
@@ -1250,7 +1250,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-sift 3.3.2
|
||||
pt-sift 3.4.0
|
||||
|
||||
=cut
|
||||
|
||||
|
@@ -4993,6 +4993,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-slave-delay 3.3.2
|
||||
pt-slave-delay 3.4.0
|
||||
|
||||
=cut
|
||||
|
@@ -4528,6 +4528,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-slave-find 3.3.2
|
||||
pt-slave-find 3.4.0
|
||||
|
||||
=cut
|
||||
|
@@ -6164,6 +6164,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-slave-restart 3.3.2
|
||||
pt-slave-restart 3.4.0
|
||||
|
||||
=cut
|
||||
|
385
bin/pt-stalk
385
bin/pt-stalk
@@ -9,10 +9,10 @@ set -u
|
||||
# ###########################################################################
|
||||
# log_warn_die package
|
||||
# This package is a copy without comments from the original. The original
|
||||
# with comments and its test file can be found in the Bazaar repository at,
|
||||
# with comments and its test file can be found in the GitHub repository at,
|
||||
# lib/bash/log_warn_die.sh
|
||||
# t/lib/bash/log_warn_die.sh
|
||||
# See https://launchpad.net/percona-toolkit for more information.
|
||||
# See https://github.com/percona/percona-toolkit for more information.
|
||||
# ###########################################################################
|
||||
|
||||
|
||||
@@ -57,10 +57,10 @@ _d () {
|
||||
# ###########################################################################
|
||||
# subshell package
|
||||
# This package is a copy without comments from the original. The original
|
||||
# with comments and its test file can be found in the Bazaar repository at,
|
||||
# with comments and its test file can be found in the GitHub repository at,
|
||||
# lib/bash/subshell.sh
|
||||
# t/lib/bash/subshell.sh
|
||||
# See https://launchpad.net/percona-toolkit for more information.
|
||||
# See https://github.com/percona/percona-toolkit for more information.
|
||||
# ###########################################################################
|
||||
|
||||
|
||||
@@ -109,10 +109,10 @@ kill_all_subshells() {
|
||||
# ###########################################################################
|
||||
# parse_options package
|
||||
# This package is a copy without comments from the original. The original
|
||||
# with comments and its test file can be found in the Bazaar repository at,
|
||||
# with comments and its test file can be found in the GitHub repository at,
|
||||
# lib/bash/parse_options.sh
|
||||
# t/lib/bash/parse_options.sh
|
||||
# See https://launchpad.net/percona-toolkit for more information.
|
||||
# See https://github.com/percona/percona-toolkit for more information.
|
||||
# ###########################################################################
|
||||
|
||||
|
||||
@@ -128,7 +128,6 @@ OPT_ERRS=0 # How many command line option errors
|
||||
OPT_VERSION="" # If --version was specified
|
||||
OPT_HELP="" # If --help was specified
|
||||
OPT_ASK_PASS="" # If --ask-pass was specified
|
||||
OPT_MYSQL_ONLY="" # If --mysql-only was specified
|
||||
PO_DIR="" # Directory with program option spec files
|
||||
|
||||
usage() {
|
||||
@@ -335,7 +334,7 @@ _eval_po() {
|
||||
*)
|
||||
echo "Invalid attribute in $opt_spec: $line" >&2
|
||||
exit 1
|
||||
esac
|
||||
esac
|
||||
done < "$opt_spec"
|
||||
|
||||
if [ -z "$opt" ]; then
|
||||
@@ -459,7 +458,6 @@ _parse_command_line() {
|
||||
else
|
||||
spec=$(grep "^short form:-$opt\$" "$PT_TMPDIR"/po/* | cut -d ':' -f 1)
|
||||
if [ -z "$spec" ]; then
|
||||
option_error "Unknown option: $real_opt"
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
@@ -475,7 +473,7 @@ _parse_command_line() {
|
||||
if [ "$val" ]; then
|
||||
option_error "Option $real_opt does not take a value"
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
if [ "$opt_is_negated" ]; then
|
||||
val=""
|
||||
else
|
||||
@@ -518,10 +516,10 @@ size_to_bytes() {
|
||||
# ###########################################################################
|
||||
# mysql_options package
|
||||
# This package is a copy without comments from the original. The original
|
||||
# with comments and its test file can be found in the Bazaar repository at,
|
||||
# with comments and its test file can be found in the GitHub repository at,
|
||||
# lib/bash/mysql_options.sh
|
||||
# t/lib/bash/mysql_options.sh
|
||||
# See https://launchpad.net/percona-toolkit for more information.
|
||||
# See https://github.com/percona/percona-toolkit for more information.
|
||||
# ###########################################################################
|
||||
|
||||
|
||||
@@ -544,16 +542,23 @@ mysql_options() {
|
||||
if [ -n "$OPT_USER" ]; then
|
||||
MYSQL_ARGS="$MYSQL_ARGS --user=$OPT_USER"
|
||||
fi
|
||||
if [ -n "$OPT_PASSWORD" ]; then
|
||||
if [ -n "$OPT_ASK_PASS" ]; then
|
||||
stty -echo
|
||||
>&2 printf "Enter MySQL password: "
|
||||
read GIVEN_PASS
|
||||
stty echo
|
||||
printf "\n"
|
||||
MYSQL_ARGS="$MYSQL_ARGS --password=$GIVEN_PASS"
|
||||
elif [ -n "$OPT_PASSWORD" ]; then
|
||||
MYSQL_ARGS="$MYSQL_ARGS --password=$OPT_PASSWORD"
|
||||
fi
|
||||
|
||||
|
||||
echo $MYSQL_ARGS
|
||||
}
|
||||
|
||||
arrange_mysql_options() {
|
||||
local opts="$1"
|
||||
|
||||
|
||||
local rearranged=""
|
||||
for opt in $opts; do
|
||||
if [ "$(echo $opt | awk -F= '{print $1}')" = "--defaults-file" ]; then
|
||||
@@ -562,7 +567,7 @@ arrange_mysql_options() {
|
||||
rearranged="$rearranged $opt"
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
echo "$rearranged"
|
||||
}
|
||||
|
||||
@@ -573,10 +578,10 @@ arrange_mysql_options() {
|
||||
# ###########################################################################
|
||||
# tmpdir package
|
||||
# This package is a copy without comments from the original. The original
|
||||
# with comments and its test file can be found in the Bazaar repository at,
|
||||
# with comments and its test file can be found in the GitHub repository at,
|
||||
# lib/bash/tmpdir.sh
|
||||
# t/lib/bash/tmpdir.sh
|
||||
# See https://launchpad.net/percona-toolkit for more information.
|
||||
# See https://github.com/percona/percona-toolkit for more information.
|
||||
# ###########################################################################
|
||||
|
||||
|
||||
@@ -614,10 +619,10 @@ rm_tmpdir() {
|
||||
# ###########################################################################
|
||||
# alt_cmds package
|
||||
# This package is a copy without comments from the original. The original
|
||||
# with comments and its test file can be found in the Bazaar repository at,
|
||||
# with comments and its test file can be found in the GitHub repository at,
|
||||
# lib/bash/alt_cmds.sh
|
||||
# t/lib/bash/alt_cmds.sh
|
||||
# See https://launchpad.net/percona-toolkit for more information.
|
||||
# See https://github.com/percona/percona-toolkit for more information.
|
||||
# ###########################################################################
|
||||
|
||||
|
||||
@@ -661,10 +666,10 @@ _which() {
|
||||
# ###########################################################################
|
||||
# safeguards package
|
||||
# This package is a copy without comments from the original. The original
|
||||
# with comments and its test file can be found in the Bazaar repository at,
|
||||
# with comments and its test file can be found in the GitHub repository at,
|
||||
# lib/bash/safeguards.sh
|
||||
# t/lib/bash/safeguards.sh
|
||||
# See https://launchpad.net/percona-toolkit for more information.
|
||||
# See https://github.com/percona/percona-toolkit for more information.
|
||||
# ###########################################################################
|
||||
|
||||
|
||||
@@ -717,10 +722,10 @@ check_disk_space() {
|
||||
# ###########################################################################
|
||||
# daemon package
|
||||
# This package is a copy without comments from the original. The original
|
||||
# with comments and its test file can be found in the Bazaar repository at,
|
||||
# with comments and its test file can be found in the GitHub repository at,
|
||||
# lib/bash/daemon.sh
|
||||
# t/lib/bash/daemon.sh
|
||||
# See https://launchpad.net/percona-toolkit for more information.
|
||||
# See https://github.com/percona/percona-toolkit for more information.
|
||||
# ###########################################################################
|
||||
|
||||
|
||||
@@ -766,10 +771,10 @@ remove_pid_file() {
|
||||
# ###########################################################################
|
||||
# collect package
|
||||
# This package is a copy without comments from the original. The original
|
||||
# with comments and its test file can be found in the Bazaar repository at,
|
||||
# with comments and its test file can be found in the GitHub repository at,
|
||||
# lib/bash/collect.sh
|
||||
# t/lib/bash/collect.sh
|
||||
# See https://launchpad.net/percona-toolkit for more information.
|
||||
# See https://github.com/percona/percona-toolkit for more information.
|
||||
# ###########################################################################
|
||||
|
||||
|
||||
@@ -796,9 +801,65 @@ collect() {
|
||||
local d="$1" # directory to save results in
|
||||
local p="$2" # prefix for each result file
|
||||
|
||||
local mysqld_pid=""
|
||||
local cnt=$(($OPT_RUN_TIME / $OPT_SLEEP_COLLECT))
|
||||
|
||||
if [ ! "$OPT_SYSTEM_ONLY" ]; then
|
||||
local mysqld_pid=""
|
||||
local mysql_version=""
|
||||
local mysql_error_log=""
|
||||
local tail_error_log_pid=""
|
||||
local have_lock_waits_table=""
|
||||
local have_oprofile=""
|
||||
local mysqladmin_pid=""
|
||||
local mutex=""
|
||||
local tcpdump_pid=""
|
||||
local ps_instrumentation_enabled=""
|
||||
|
||||
collect_mysql_data_one
|
||||
fi
|
||||
|
||||
if [ ! "$OPT_MYSQL_ONLY" ]; then
|
||||
collect_system_data
|
||||
fi
|
||||
|
||||
log "Loop start: $(date +'TS %s.%N %F %T')"
|
||||
local start_time=$(date +'%s')
|
||||
local curr_time=$start_time
|
||||
local ts="$(date +"TS %s.%N %F %T")"
|
||||
|
||||
while [ $((curr_time - start_time)) -lt $OPT_RUN_TIME ]; do
|
||||
if [ ! "$OPT_MYSQL_ONLY" ]; then
|
||||
collect_system_data_loop
|
||||
fi
|
||||
|
||||
if [ ! "$OPT_SYSTEM_ONLY" ]; then
|
||||
collect_mysql_data_loop
|
||||
fi
|
||||
|
||||
curr_time=$(date +'%s')
|
||||
done
|
||||
log "Loop end: $(date +'TS %s.%N %F %T')"
|
||||
|
||||
if [ ! "$OPT_SYSTEM_ONLY" ]; then
|
||||
collect_mysql_data_two
|
||||
fi
|
||||
|
||||
hostname > "$d/$p-hostname"
|
||||
|
||||
wait_for_subshells $OPT_RUN_TIME
|
||||
kill_all_subshells
|
||||
for file in "$d/$p-"*; do
|
||||
if [ -z "$(grep -v '^TS ' --max-count 10 "$file")" ]; then
|
||||
log "Removing empty file $file";
|
||||
rm "$file"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
collect_mysql_data_one() {
|
||||
if [ ! "$OPT_MYSQL_ONLY" ]; then
|
||||
mysqld_pid=$(_pidof mysqld | awk '{print $1; exit;}')
|
||||
port=$($CMD_MYSQL $EXT_ARGV -ss -e 'SELECT @@port')
|
||||
mysqld_pid=$(lsof -i ":${port}" | grep -i listen | cut -f 3 -d" ")
|
||||
fi
|
||||
|
||||
if [ "$CMD_PMAP" -a "$mysqld_pid" ]; then
|
||||
@@ -820,27 +881,27 @@ collect() {
|
||||
collect_mysql_variables "$d/$p-variables" &
|
||||
sleep .5
|
||||
|
||||
local mysql_version="$(awk '/^version[^_]/{print substr($2,1,3)}' "$d/$p-variables")"
|
||||
mysql_version="$(awk '/^version[^_]/{print substr($2,1,3)}' "$d/$p-variables")"
|
||||
|
||||
local mysql_error_log="$(awk '/^log_error/{print $2}' "$d/$p-variables")"
|
||||
mysql_error_log="$(awk '/^log_error\s/{print $2}' "$d/$p-variables")"
|
||||
if [ -z "$mysql_error_log" -a "$mysqld_pid" ]; then
|
||||
log $mysqld_pid
|
||||
mysql_error_log="$(ls -l /proc/$mysqld_pid/fd | awk '/ 2 ->/{print $NF}')"
|
||||
fi
|
||||
|
||||
local tail_error_log_pid=""
|
||||
if [ "$mysql_error_log" -a ! "$OPT_MYSQL_ONLY" ]; then
|
||||
log "The MySQL error log seems to be $mysql_error_log"
|
||||
tail -f "$mysql_error_log" >"$d/$p-log_error" &
|
||||
tail_error_log_pid=$!
|
||||
|
||||
$CMD_MYSQLADMIN $EXT_ARGV debug
|
||||
$CMD_MYSQLADMIN $EXT_ARGV
|
||||
else
|
||||
log "Could not find the MySQL error log"
|
||||
fi
|
||||
if [ "${mysql_version}" '>' "5.1" ]; then
|
||||
local mutex="SHOW ENGINE INNODB MUTEX"
|
||||
mutex="SHOW ENGINE INNODB MUTEX"
|
||||
else
|
||||
local mutex="SHOW MUTEX STATUS"
|
||||
mutex="SHOW MUTEX STATUS"
|
||||
fi
|
||||
innodb_status 1
|
||||
tokudb_status 1
|
||||
@@ -849,7 +910,6 @@ collect() {
|
||||
$CMD_MYSQL $EXT_ARGV -e "$mutex" >> "$d/$p-mutex-status1" &
|
||||
open_tables >> "$d/$p-opentables1" &
|
||||
|
||||
local tcpdump_pid=""
|
||||
if [ "$CMD_TCPDUMP" -a "$OPT_COLLECT_TCPDUMP" ]; then
|
||||
local port=$(awk '/^port/{print $2}' "$d/$p-variables")
|
||||
if [ "$port" ]; then
|
||||
@@ -858,7 +918,6 @@ collect() {
|
||||
fi
|
||||
fi
|
||||
|
||||
local have_oprofile=""
|
||||
if [ "$CMD_OPCONTROL" -a "$OPT_COLLECT_OPROFILE" ]; then
|
||||
if $CMD_OPCONTROL --init; then
|
||||
$CMD_OPCONTROL --start --no-vmlinux
|
||||
@@ -869,114 +928,109 @@ collect() {
|
||||
local strace_pid=$!
|
||||
fi
|
||||
|
||||
if [ ! "$OPT_MYSQL_ONLY" ]; then
|
||||
ps -eaF >> "$d/$p-ps" &
|
||||
top -bn${OPT_RUN_TIME} >> "$d/$p-top" &
|
||||
|
||||
[ "$mysqld_pid" ] && _lsof $mysqld_pid >> "$d/$p-lsof" &
|
||||
|
||||
if [ "$CMD_SYSCTL" ]; then
|
||||
$CMD_SYSCTL -a >> "$d/$p-sysctl" &
|
||||
fi
|
||||
|
||||
if [ "$CMD_DMESG" ]; then
|
||||
local UPTIME=`cat /proc/uptime | awk '{ print $1 }'`
|
||||
local START_TIME=$(echo "$UPTIME 60" | awk '{print ($1 - $2)}')
|
||||
$CMD_DMESG | perl -ne 'm/\[\s*(\d+)\./; if ($1 > '${START_TIME}') { print }' >> "$d/$p-dmesg" &
|
||||
fi
|
||||
|
||||
local cnt=$(($OPT_RUN_TIME / $OPT_SLEEP_COLLECT))
|
||||
if [ "$CMD_VMSTAT" ]; then
|
||||
$CMD_VMSTAT $OPT_SLEEP_COLLECT $cnt >> "$d/$p-vmstat" &
|
||||
$CMD_VMSTAT $OPT_RUN_TIME 2 >> "$d/$p-vmstat-overall" &
|
||||
fi
|
||||
if [ "$CMD_IOSTAT" ]; then
|
||||
$CMD_IOSTAT -dx $OPT_SLEEP_COLLECT $cnt >> "$d/$p-iostat" &
|
||||
$CMD_IOSTAT -dx $OPT_RUN_TIME 2 >> "$d/$p-iostat-overall" &
|
||||
fi
|
||||
if [ "$CMD_MPSTAT" ]; then
|
||||
$CMD_MPSTAT -P ALL $OPT_SLEEP_COLLECT $cnt >> "$d/$p-mpstat" &
|
||||
$CMD_MPSTAT -P ALL $OPT_RUN_TIME 1 >> "$d/$p-mpstat-overall" &
|
||||
fi
|
||||
|
||||
$CMD_MYSQLADMIN $EXT_ARGV ext -i$OPT_SLEEP_COLLECT -c$cnt >>"$d/$p-mysqladmin" &
|
||||
local mysqladmin_pid=$!
|
||||
fi
|
||||
|
||||
local have_lock_waits_table=""
|
||||
$CMD_MYSQL $EXT_ARGV -e "SHOW TABLES FROM INFORMATION_SCHEMA" \
|
||||
| grep -i "INNODB_LOCK_WAITS" >/dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
have_lock_waits_table="yes"
|
||||
fi
|
||||
|
||||
log "Loop start: $(date +'TS %s.%N %F %T')"
|
||||
local start_time=$(date +'%s')
|
||||
local curr_time=$start_time
|
||||
local ps_instrumentation_enabled=$($CMD_MYSQL $EXT_ARGV -e 'SELECT ENABLED FROM performance_schema.setup_instruments WHERE NAME = "transaction";' \
|
||||
$CMD_MYSQLADMIN $EXT_ARGV ext -i$OPT_SLEEP_COLLECT -c$cnt >>"$d/$p-mysqladmin" &
|
||||
mysqladmin_pid=$!
|
||||
|
||||
ps_instrumentation_enabled=$($CMD_MYSQL $EXT_ARGV -e 'SELECT ENABLED FROM performance_schema.setup_instruments WHERE NAME = "transaction";' \
|
||||
| sed "2q;d" | sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/')
|
||||
|
||||
if [ $ps_instrumentation_enabled != "yes" ]; then
|
||||
log "Performance Schema instrumentation is disabled"
|
||||
fi
|
||||
}
|
||||
|
||||
while [ $((curr_time - start_time)) -lt $OPT_RUN_TIME ]; do
|
||||
if [ ! "$OPT_MYSQL_ONLY" ]; then
|
||||
disk_space $d > $d/$p-disk-space
|
||||
check_disk_space \
|
||||
$d/$p-disk-space \
|
||||
"$OPT_DISK_BYTES_FREE" \
|
||||
"$OPT_DISK_PCT_FREE" \
|
||||
|| break
|
||||
collect_system_data() {
|
||||
ps -eaF >> "$d/$p-ps" &
|
||||
top -bn${OPT_RUN_TIME} >> "$d/$p-top" &
|
||||
|
||||
sleep $(date +'%s.%N' | awk "{print $OPT_SLEEP_COLLECT - (\$1 % $OPT_SLEEP_COLLECT)}")
|
||||
local ts="$(date +"TS %s.%N %F %T")"
|
||||
[ "$mysqld_pid" ] && _lsof $mysqld_pid >> "$d/$p-lsof" &
|
||||
|
||||
if [ -d "/proc" ]; then
|
||||
if [ -f "/proc/diskstats" ]; then
|
||||
(echo $ts; cat /proc/diskstats) >> "$d/$p-diskstats" &
|
||||
fi
|
||||
if [ -f "/proc/stat" ]; then
|
||||
(echo $ts; cat /proc/stat) >> "$d/$p-procstat" &
|
||||
fi
|
||||
if [ -f "/proc/vmstat" ]; then
|
||||
(echo $ts; cat /proc/vmstat) >> "$d/$p-procvmstat" &
|
||||
fi
|
||||
if [ -f "/proc/meminfo" ]; then
|
||||
(echo $ts; cat /proc/meminfo) >> "$d/$p-meminfo" &
|
||||
fi
|
||||
if [ -f "/proc/slabinfo" ]; then
|
||||
(echo $ts; cat /proc/slabinfo) >> "$d/$p-slabinfo" &
|
||||
fi
|
||||
if [ -f "/proc/interrupts" ]; then
|
||||
(echo $ts; cat /proc/interrupts) >> "$d/$p-interrupts" &
|
||||
fi
|
||||
fi
|
||||
(echo $ts; df -k) >> "$d/$p-df" &
|
||||
(echo $ts; netstat -antp) >> "$d/$p-netstat" &
|
||||
(echo $ts; netstat -s) >> "$d/$p-netstat_s" &
|
||||
if [ "$CMD_SYSCTL" ]; then
|
||||
$CMD_SYSCTL -a >> "$d/$p-sysctl" &
|
||||
fi
|
||||
|
||||
if [ "$CMD_DMESG" ]; then
|
||||
local UPTIME=`cat /proc/uptime | awk '{ print $1 }'`
|
||||
local START_TIME=$(echo "$UPTIME 60" | awk '{print ($1 - $2)}')
|
||||
$CMD_DMESG | perl -ne 'm/\[\s*(\d+)\./; if ($1 > '${START_TIME}') { print }' >> "$d/$p-dmesg" &
|
||||
fi
|
||||
|
||||
if [ "$CMD_VMSTAT" ]; then
|
||||
$CMD_VMSTAT $OPT_SLEEP_COLLECT $cnt >> "$d/$p-vmstat" &
|
||||
$CMD_VMSTAT $OPT_RUN_TIME 2 >> "$d/$p-vmstat-overall" &
|
||||
fi
|
||||
if [ "$CMD_IOSTAT" ]; then
|
||||
$CMD_IOSTAT -dx $OPT_SLEEP_COLLECT $cnt >> "$d/$p-iostat" &
|
||||
$CMD_IOSTAT -dx $OPT_RUN_TIME 2 >> "$d/$p-iostat-overall" &
|
||||
fi
|
||||
if [ "$CMD_MPSTAT" ]; then
|
||||
$CMD_MPSTAT -P ALL $OPT_SLEEP_COLLECT $cnt >> "$d/$p-mpstat" &
|
||||
$CMD_MPSTAT -P ALL $OPT_RUN_TIME 1 >> "$d/$p-mpstat-overall" &
|
||||
fi
|
||||
}
|
||||
|
||||
collect_mysql_data_loop() {
|
||||
(echo $ts; $CMD_MYSQL $EXT_ARGV -e "SHOW FULL PROCESSLIST\G") \
|
||||
>> "$d/$p-processlist" &
|
||||
if [ "$have_lock_waits_table" ]; then
|
||||
(echo $ts; lock_waits) >>"$d/$p-lock-waits" &
|
||||
(echo $ts; transactions) >>"$d/$p-transactions" &
|
||||
fi
|
||||
|
||||
if [ "${mysql_version}" '>' "5.6" ] && [ $ps_instrumentation_enabled == "yes" ]; then
|
||||
ps_locks_transactions "$d/$p-ps-locks-transactions"
|
||||
fi
|
||||
|
||||
if [ "${mysql_version}" '>' "5.6" ]; then
|
||||
(echo $ts; ps_prepared_statements) >> "$d/$p-prepared-statements" &
|
||||
fi
|
||||
|
||||
slave_status "$d/$p-slave-status" "${mysql_version}"
|
||||
}
|
||||
|
||||
collect_system_data_loop() {
|
||||
disk_space $d > $d/$p-disk-space
|
||||
check_disk_space \
|
||||
$d/$p-disk-space \
|
||||
"$OPT_DISK_BYTES_FREE" \
|
||||
"$OPT_DISK_PCT_FREE" \
|
||||
|| break
|
||||
|
||||
sleep $(date +'%s.%N' | awk "{print $OPT_SLEEP_COLLECT - (\$1 % $OPT_SLEEP_COLLECT)}")
|
||||
ts="$(date +"TS %s.%N %F %T")"
|
||||
|
||||
if [ -d "/proc" ]; then
|
||||
if [ -f "/proc/diskstats" ]; then
|
||||
(echo $ts; cat /proc/diskstats) >> "$d/$p-diskstats" &
|
||||
fi
|
||||
(echo $ts; $CMD_MYSQL $EXT_ARGV -e "SHOW FULL PROCESSLIST\G") \
|
||||
>> "$d/$p-processlist" &
|
||||
if [ "$have_lock_waits_table" ]; then
|
||||
(echo $ts; lock_waits) >>"$d/$p-lock-waits" &
|
||||
(echo $ts; transactions) >>"$d/$p-transactions" &
|
||||
if [ -f "/proc/stat" ]; then
|
||||
(echo $ts; cat /proc/stat) >> "$d/$p-procstat" &
|
||||
fi
|
||||
|
||||
if [ "${mysql_version}" '>' "5.6" ] && [ $ps_instrumentation_enabled == "yes" ]; then
|
||||
ps_locks_transactions "$d/$p-ps-locks-transactions"
|
||||
if [ -f "/proc/vmstat" ]; then
|
||||
(echo $ts; cat /proc/vmstat) >> "$d/$p-procvmstat" &
|
||||
fi
|
||||
|
||||
if [ "${mysql_version}" '>' "5.6" ]; then
|
||||
(echo $ts; ps_prepared_statements) >> "$d/$p-prepared-statements" &
|
||||
if [ -f "/proc/meminfo" ]; then
|
||||
(echo $ts; cat /proc/meminfo) >> "$d/$p-meminfo" &
|
||||
fi
|
||||
if [ -f "/proc/slabinfo" ]; then
|
||||
(echo $ts; cat /proc/slabinfo) >> "$d/$p-slabinfo" &
|
||||
fi
|
||||
if [ -f "/proc/interrupts" ]; then
|
||||
(echo $ts; cat /proc/interrupts) >> "$d/$p-interrupts" &
|
||||
fi
|
||||
fi
|
||||
(echo $ts; df -k) >> "$d/$p-df" &
|
||||
(echo $ts; netstat -antp) >> "$d/$p-netstat" &
|
||||
(echo $ts; netstat -s) >> "$d/$p-netstat_s" &
|
||||
}
|
||||
|
||||
slave_status "$d/$p-slave-status" "${mysql_version}"
|
||||
|
||||
curr_time=$(date +'%s')
|
||||
done
|
||||
log "Loop end: $(date +'TS %s.%N %F %T')"
|
||||
|
||||
collect_mysql_data_two() {
|
||||
if [ "$have_oprofile" ]; then
|
||||
$CMD_OPCONTROL --stop
|
||||
$CMD_OPCONTROL --dump
|
||||
@@ -1020,20 +1074,9 @@ collect() {
|
||||
$CMD_MYSQL $EXT_ARGV -e "$mutex" >> "$d/$p-mutex-status2" &
|
||||
open_tables >> "$d/$p-opentables2" &
|
||||
|
||||
kill $mysqladmin_pid
|
||||
[ "$mysqladmin_pid" ] && kill $mysqladmin_pid
|
||||
[ "$tail_error_log_pid" ] && kill $tail_error_log_pid
|
||||
[ "$tcpdump_pid" ] && kill $tcpdump_pid
|
||||
|
||||
hostname > "$d/$p-hostname"
|
||||
|
||||
wait_for_subshells $OPT_RUN_TIME
|
||||
kill_all_subshells
|
||||
for file in "$d/$p-"*; do
|
||||
if [ -z "$(grep -v '^TS ' --max-count 10 "$file")" ]; then
|
||||
log "Removing empty file $file";
|
||||
rm "$file"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
open_tables() {
|
||||
@@ -1041,7 +1084,7 @@ open_tables() {
|
||||
if [ -n "$open_tables" -a $open_tables -le 1000 ]; then
|
||||
$CMD_MYSQL $EXT_ARGV -e 'SHOW OPEN TABLES' &
|
||||
else
|
||||
log "Too many open tables: $open_tables"
|
||||
log "Logging disabled due to having over 1000 tables open. Number of tables currently open: $open_tables"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -1087,8 +1130,13 @@ transactions() {
|
||||
tokudb_status() {
|
||||
local n=$1
|
||||
|
||||
$CMD_MYSQL $EXT_ARGV -e "SHOW ENGINE TOKUDB STATUS\G" \
|
||||
>> "$d/$p-tokudbstatus$n" || rm -f "$d/$p-tokudbstatus$n"
|
||||
has_tokudb=`$CMD_MYSQL $EXT_ARGV -e "SHOW ENGINES" | grep -i 'tokudb'`
|
||||
exit_code=$?
|
||||
|
||||
if [ $exit_code -eq 0 ]; then
|
||||
$CMD_MYSQL $EXT_ARGV -e "SHOW ENGINE TOKUDB STATUS\G" \
|
||||
>> "$d/$p-tokudbstatus$n" || rm -f "$d/$p-tokudbstatus$n"
|
||||
fi
|
||||
}
|
||||
|
||||
innodb_status() {
|
||||
@@ -1171,11 +1219,11 @@ slave_status() {
|
||||
echo -e "\n$sql\n" >> $outfile
|
||||
$CMD_MYSQL $EXT_ARGV -e "$sql" >> $outfile
|
||||
|
||||
sql="SELECT * FROM replication_connection_status\G"
|
||||
sql="SELECT * FROM performance_schema.replication_connection_status\G"
|
||||
echo -e "\n$sql\n" >> $outfile
|
||||
$CMD_MYSQL $EXT_ARGV -e "$sql" >> $outfile
|
||||
|
||||
sql="SELECT * FROM replication_applier_status JOIN replication_applier_status_by_coordinator USING(channel_name)\G"
|
||||
sql="SELECT * FROM performance_schema.replication_applier_status JOIN performance_schema.replication_applier_status_by_coordinator USING(channel_name)\G"
|
||||
echo -e "\n$sql\n" >> $outfile
|
||||
$CMD_MYSQL $EXT_ARGV -e "$sql" >> $outfile
|
||||
fi
|
||||
@@ -1351,13 +1399,17 @@ sleep_ok() {
|
||||
}
|
||||
|
||||
purge_samples() {
|
||||
local dir="$1"
|
||||
local dir=`realpath -s "$1"`
|
||||
local retention_time="$2"
|
||||
local retention_count="$3"
|
||||
local retention_size="$4"
|
||||
|
||||
# Delete collect files which more than --retention-time days old.
|
||||
find "$dir" -type f -mtime +$retention_time -exec rm -f '{}' \;
|
||||
if [ -n "$OPT_PREFIX" ]; then
|
||||
find "$dir" -maxdepth 1 -type f -mtime +$retention_time -name "$OPT_PREFIX-*" -exec rm -f '{}' \;
|
||||
else
|
||||
find "$dir" -maxdepth 1 -type f -mtime +$retention_time -regextype posix-egrep -regex "$dir/[0-9]{4}(_[0-9]{2}){5}-.*" -exec rm -f '{}' \;
|
||||
fi
|
||||
|
||||
local oprofile_dir="/var/lib/oprofile/samples"
|
||||
if [ -d "$oprofile_dir" ]; then
|
||||
@@ -1370,21 +1422,21 @@ purge_samples() {
|
||||
targetCnt=$(($retention_count + 0))
|
||||
if [ $targetCnt -gt 0 ]; then
|
||||
targetCnt=$(($retention_count + 1))
|
||||
files_to_delete=$(find $dir -type f -exec basename {} \; | cut -f1 -d- | sort -r | uniq | tail -n +${targetCnt})
|
||||
files_to_delete=$(find "$dir" -maxdepth 1 -type f -exec basename {} \; | cut -f1 -d- | sort -r | uniq | tail -n +${targetCnt})
|
||||
for prefix in $files_to_delete; do
|
||||
echo "deleting files ${dir}${prefix}* according to the --retention-count param"
|
||||
rm -f ${dir}${prefix}* 2>/dev/null
|
||||
echo "deleting files ${dir}/${prefix}* according to the --retention-count param"
|
||||
rm -f ${dir}/${prefix}* 2>/dev/null
|
||||
done
|
||||
fi
|
||||
|
||||
targetSize=$(($retention_size + 0))
|
||||
if [ $targetSize -gt 0 ]; then
|
||||
files_to_delete=$(find $dir -type f -exec basename {} \; | cut -f1 -d- | sort -r | uniq | tail -n +1)
|
||||
files_to_delete=$(find "$dir" -maxdepth 1 -type f -exec basename {} \; | cut -f1 -d- | sort -r | uniq | tail -n +1)
|
||||
for prefix in $files_to_delete; do
|
||||
current_size=$(du -BM $dir | cut -f1 -d"M")
|
||||
if [ $current_size -gt $targetSize ]; then
|
||||
echo "deleting files ${dir}${prefix}* according to the --retention-size param"
|
||||
rm -f ${dir}${prefix}* 2>/dev/null
|
||||
echo "deleting files ${dir}/${prefix}* according to the --retention-size param"
|
||||
rm -f ${dir}/${prefix}* 2>/dev/null
|
||||
else
|
||||
break
|
||||
fi
|
||||
@@ -1448,6 +1500,7 @@ stalk() {
|
||||
# ##################################################################
|
||||
log "Collect $ITER triggered"
|
||||
log "MYSQL_ONLY: $OPT_MYSQL_ONLY"
|
||||
log "SYSTEM_ONLY: $OPT_SYSTEM_ONLY"
|
||||
|
||||
# Send email to whomever that collect has been triggered.
|
||||
if [ "$OPT_NOTIFY_BY_EMAIL" ]; then
|
||||
@@ -1464,6 +1517,8 @@ stalk() {
|
||||
if [ -n "$last_prefix" ]; then
|
||||
margin=$(du -mc "$OPT_DEST"/"$last_prefix"-* | tail -n 1 | awk '{print $1'})
|
||||
fi
|
||||
# Disk space checked even if system data collection is OFF
|
||||
# See https://jira.percona.com/browse/PT-1486
|
||||
disk_space "$OPT_DEST" > "$OPT_DEST/$prefix-disk-space"
|
||||
check_disk_space \
|
||||
"$OPT_DEST/$prefix-disk-space" \
|
||||
@@ -1629,18 +1684,20 @@ if [ "${0##*/}" = "$TOOL" ] \
|
||||
EXT_ARGV="$(arrange_mysql_options "$EXT_ARGV $MYSQL_ARGS")"
|
||||
|
||||
|
||||
# Check that mysql and mysqladmin are in PATH. If not, we're
|
||||
# already dead in the water, so don't bother with cmd line opts,
|
||||
# just error and exit.
|
||||
[ -n "$(mysql --help)" ] \
|
||||
|| die "Cannot execute mysql. Check that it is in PATH."
|
||||
[ -n "$(mysqladmin --help)" ] \
|
||||
|| die "Cannot execute mysqladmin. Check that it is in PATH."
|
||||
if [ ! "$OPT_SYSTEM_ONLY" ]; then
|
||||
# Check that mysql and mysqladmin are in PATH. If not, we're
|
||||
# already dead in the water, so don't bother with cmd line opts,
|
||||
# just error and exit.
|
||||
[ -n "$(mysql --help)" ] \
|
||||
|| die "Cannot execute mysql. Check that it is in PATH."
|
||||
[ -n "$(mysqladmin --help)" ] \
|
||||
|| die "Cannot execute mysqladmin. Check that it is in PATH."
|
||||
|
||||
# Now that we have the cmd line opts, check that we can actually
|
||||
# connect to MySQL.
|
||||
[ -n "$(mysql $EXT_ARGV -e 'SELECT 1')" ] \
|
||||
|| die "Cannot connect to MySQL. Check that MySQL is running and that the options after -- are correct."
|
||||
# Now that we have the cmd line opts, check that we can actually
|
||||
# connect to MySQL.
|
||||
[ -n "$(mysql $EXT_ARGV -e 'SELECT 1')" ] \
|
||||
|| die "Cannot connect to MySQL. Check that MySQL is running and that the options after -- are correct."
|
||||
fi
|
||||
|
||||
# Check existence and access to the --dest dir if we're collecting.
|
||||
if [ "$OPT_COLLECT" ]; then
|
||||
@@ -2232,6 +2289,10 @@ L<"--disk-pct-free">, are still respected.
|
||||
|
||||
See also L<"--collect">.
|
||||
|
||||
=item --system-only
|
||||
|
||||
Trigger only operating system related captures, ignoring all others.
|
||||
|
||||
=item --threshold
|
||||
|
||||
type: int; default: 25
|
||||
@@ -2425,7 +2486,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-stalk 3.3.2
|
||||
pt-stalk 3.4.0
|
||||
|
||||
=cut
|
||||
|
||||
|
@@ -2729,7 +2729,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-summary 3.3.2
|
||||
pt-summary 3.4.0
|
||||
|
||||
=cut
|
||||
|
||||
|
@@ -14188,6 +14188,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-table-checksum 3.3.2
|
||||
pt-table-checksum 3.4.0
|
||||
|
||||
=cut
|
||||
|
@@ -3456,7 +3456,7 @@ sub set_src {
|
||||
}
|
||||
elsif ( lc $src eq 'right' ) {
|
||||
$self->{src_db_tbl} = $self->{right_db_tbl};
|
||||
$self->{dst_db_tbl} = $self->{left_db_tbl};
|
||||
$self->{dst_db_tbl} = $self->{left_db_tbl};
|
||||
}
|
||||
else {
|
||||
die "src argument must be either 'left' or 'right'"
|
||||
@@ -3592,13 +3592,14 @@ sub make_UPDATE {
|
||||
my $types = $self->{tbl_struct}->{type_for};
|
||||
return "UPDATE $self->{dst_db_tbl} SET "
|
||||
. join(', ', map {
|
||||
my $is_hex = ($types->{$_} || '') =~ m/^0x[0-9a-fA-F]+$/i;
|
||||
my $is_char = ($types->{$_} || '') =~ m/char|text|enum/i;
|
||||
my $is_float = ($types->{$_} || '') =~ m/float|double/i;
|
||||
$self->{Quoter}->quote($_)
|
||||
. '='
|
||||
. $self->{Quoter}->quote_val(
|
||||
$row->{$_},
|
||||
is_char => $is_char,
|
||||
is_char => $is_char && !$is_hex,
|
||||
is_float => $is_float,
|
||||
);
|
||||
} grep { !$in_where{$_} } @cols)
|
||||
@@ -3622,7 +3623,7 @@ sub make_REPLACE {
|
||||
|
||||
sub make_row {
|
||||
my ( $self, $verb, $row, $cols ) = @_;
|
||||
my @cols;
|
||||
my @cols;
|
||||
if ( my $dbh = $self->{fetch_back} ) {
|
||||
my $where = $self->make_where_clause($row, $cols);
|
||||
my $sql = $self->make_fetch_back_query($where);
|
||||
@@ -3636,37 +3637,44 @@ sub make_row {
|
||||
}
|
||||
my $q = $self->{Quoter};
|
||||
my $type_for = $self->{tbl_struct}->{type_for};
|
||||
|
||||
return "$verb INTO $self->{dst_db_tbl}("
|
||||
. join(', ', map { $q->quote($_) } @cols)
|
||||
. ') VALUES ('
|
||||
. join(', ',
|
||||
map {
|
||||
my $is_hex = ($type_for->{$_} || '') =~ m/^0x[0-9a-fA-F]+$/i;
|
||||
my $is_char = ($type_for->{$_} || '') =~ m/char|text|enum/i;
|
||||
my $is_float = ($type_for->{$_} || '') =~ m/float|double/i;
|
||||
$q->quote_val(
|
||||
$row->{$_},
|
||||
is_char => $is_char,
|
||||
is_char => $is_char && !$is_hex,
|
||||
is_float => $is_float,
|
||||
)
|
||||
} @cols)
|
||||
. ')';
|
||||
|
||||
}
|
||||
|
||||
sub make_where_clause {
|
||||
my ( $self, $row, $cols ) = @_;
|
||||
my @clauses = map {
|
||||
my $col = $_;
|
||||
$col = $self->{Quoter}->quote($col);
|
||||
|
||||
my $val = $row->{$_};
|
||||
my $sep = defined $val ? '=' : ' IS ';
|
||||
my $is_char = ($self->{tbl_struct}->{type_for}->{$_} || '') =~ m/char|text|enum/i;
|
||||
my $is_float = ($self->{tbl_struct}->{type_for}->{$_} || '') =~ m/float|double/i;
|
||||
$self->{Quoter}->quote($_) . $sep . $self->{Quoter}->quote_val($val,
|
||||
my $is_crc32 = ($self->{tbl_struct}->{type_for}->{$_} || '') =~ m/binary|text|blob/i;
|
||||
$col = "CRC32($col)" if ($is_crc32);
|
||||
$col . $sep . $self->{Quoter}->quote_val($val,
|
||||
is_char => $is_char,
|
||||
is_float => $is_float);
|
||||
} @$cols;
|
||||
return join(' AND ', @clauses);
|
||||
}
|
||||
|
||||
|
||||
sub get_changes {
|
||||
my ( $self ) = @_;
|
||||
return %{$self->{changes}};
|
||||
@@ -3676,7 +3684,7 @@ sub get_changes {
|
||||
sub sort_cols {
|
||||
my ( $self, $row ) = @_;
|
||||
my @cols;
|
||||
if ( $self->{tbl_struct} ) {
|
||||
if ( $self->{tbl_struct} ) {
|
||||
my $pos = $self->{tbl_struct}->{col_posn};
|
||||
my @not_in_tbl;
|
||||
@cols = sort {
|
||||
@@ -3691,7 +3699,7 @@ sub sort_cols {
|
||||
1;
|
||||
}
|
||||
}
|
||||
keys %$row;
|
||||
sort keys %$row;
|
||||
push @cols, @not_in_tbl if @not_in_tbl;
|
||||
}
|
||||
else {
|
||||
@@ -4933,7 +4941,7 @@ sub make_row_checksum {
|
||||
my $query;
|
||||
if ( !$args{no_cols} ) {
|
||||
$query = join(', ',
|
||||
map {
|
||||
map {
|
||||
my $col = $_;
|
||||
if ( $col =~ m/\+ 0/ ) {
|
||||
my ($real_col) = /^(\S+)/;
|
||||
@@ -4943,6 +4951,10 @@ sub make_row_checksum {
|
||||
my ($real_col) = m/TRIM\(([^\)]+)\)/;
|
||||
$col .= " AS $real_col";
|
||||
}
|
||||
elsif ( $col =~ m/CRC32/ ) {
|
||||
my ($real_col) = m/CRC32\(([^\)]+)\)/;
|
||||
$col .= " AS $real_col";
|
||||
}
|
||||
$col;
|
||||
} @cols)
|
||||
. ', ';
|
||||
@@ -13089,6 +13101,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-table-sync 3.3.2
|
||||
pt-table-sync 3.4.0
|
||||
|
||||
=cut
|
||||
|
@@ -8519,6 +8519,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-table-usage 3.3.2
|
||||
pt-table-usage 3.4.0
|
||||
|
||||
=cut
|
||||
|
@@ -9386,6 +9386,7 @@ use Percona::Toolkit;
|
||||
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
|
||||
|
||||
use sigtrap 'handler', \&sig_int, 'normal-signals';
|
||||
binmode(STDOUT, "encoding(UTF-8)");
|
||||
|
||||
# Global variables. Only really essential variables should be here.
|
||||
my $oktorun = 1;
|
||||
@@ -11453,6 +11454,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-upgrade 3.3.2
|
||||
pt-upgrade 3.4.0
|
||||
|
||||
=cut
|
||||
|
@@ -6262,6 +6262,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-variable-advisor 3.3.2
|
||||
pt-variable-advisor 3.4.0
|
||||
|
||||
=cut
|
||||
|
@@ -3308,6 +3308,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
pt-visual-explain 3.3.2
|
||||
pt-visual-explain 3.4.0
|
||||
|
||||
=cut
|
||||
|
@@ -48,9 +48,9 @@ copyright = u'2021, Percona LLC and/or its affiliates'
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '3.3'
|
||||
version = '3.4'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '3.3.1'
|
||||
release = '3.4.0'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
@@ -567,6 +567,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
Percona Toolkit v3.3.1 released 2021-04-22
|
||||
Percona Toolkit v3.4.0 released 2022-04-05
|
||||
|
||||
=cut
|
||||
|
83
go.mod
83
go.mod
@@ -5,34 +5,71 @@ go 1.17
|
||||
require (
|
||||
github.com/Masterminds/semver v1.4.2
|
||||
github.com/alecthomas/kingpin v2.2.6+incompatible
|
||||
github.com/go-ini/ini v1.46.0
|
||||
github.com/golang/mock v1.3.1-0.20190508161146-9fa652df1129
|
||||
github.com/alecthomas/kong v0.5.0
|
||||
github.com/go-ini/ini v1.66.4
|
||||
github.com/golang/mock v1.4.4
|
||||
github.com/google/uuid v1.3.0
|
||||
github.com/hashicorp/go-version v1.2.1-0.20190424083514-192140e6f3e6
|
||||
github.com/howeyc/gopass v0.0.0-20170109162249-bf9dde6d0d2c
|
||||
github.com/lib/pq v1.2.0
|
||||
github.com/mattn/go-shellwords v1.0.6
|
||||
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe
|
||||
github.com/pborman/getopt v0.0.0-20190409184431-ee0cd42419d3
|
||||
github.com/percona/go-mysql v0.0.0-20190903141930-197f4ad8db8d
|
||||
github.com/hashicorp/go-version v1.4.0
|
||||
github.com/howeyc/gopass v0.0.0-20210920133722-c8aef6fb66ef
|
||||
github.com/lib/pq v1.10.4
|
||||
github.com/mattn/go-shellwords v1.0.12
|
||||
github.com/montanaflynn/stats v0.6.6
|
||||
github.com/pborman/getopt v1.1.0
|
||||
github.com/percona/go-mysql v0.0.0-20210427141028-73d29c6da78c
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/prometheus/common v0.13.0
|
||||
github.com/shirou/gopsutil v2.20.8+incompatible
|
||||
github.com/sirupsen/logrus v1.6.0
|
||||
github.com/stretchr/testify v1.6.1
|
||||
go.mongodb.org/mongo-driver v1.7.1
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
|
||||
github.com/shirou/gopsutil v3.21.11+incompatible
|
||||
github.com/sirupsen/logrus v1.8.1
|
||||
github.com/stretchr/testify v1.7.0
|
||||
go.mongodb.org/mongo-driver v1.9.0
|
||||
golang.org/x/crypto v0.0.0-20220331220935-ae2d96664a29
|
||||
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22
|
||||
k8s.io/api v0.18.6
|
||||
k8s.io/api v0.23.5
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect
|
||||
github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15 // indirect
|
||||
github.com/go-ole/go-ole v1.2.4 // indirect
|
||||
github.com/golang/snappy v0.0.2-0.20190904063534-ff6b7dc882cf // indirect
|
||||
github.com/klauspost/compress v1.10.10 // indirect
|
||||
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d // indirect
|
||||
github.com/StackExchange/wmi v1.2.1 // indirect
|
||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
|
||||
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/go-logr/logr v1.2.3 // indirect
|
||||
github.com/go-ole/go-ole v1.2.6 // indirect
|
||||
github.com/go-stack/stack v1.8.1 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang/snappy v0.0.4 // indirect
|
||||
github.com/google/go-cmp v0.5.7 // indirect
|
||||
github.com/google/gofuzz v1.2.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/klauspost/compress v1.15.1 // indirect
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.3 // indirect
|
||||
github.com/kr/text v0.2.0 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/rogpeppe/go-internal v1.6.1 // indirect
|
||||
github.com/smartystreets/goconvey v1.7.2 // indirect
|
||||
github.com/tklauser/go-sysconf v0.3.10 // indirect
|
||||
github.com/tklauser/numcpus v0.4.0 // indirect
|
||||
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
|
||||
github.com/xdg-go/scram v1.1.1 // indirect
|
||||
github.com/xdg-go/stringprep v1.0.3 // indirect
|
||||
github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect
|
||||
github.com/yusufpapurcu/wmi v1.2.2 // indirect
|
||||
golang.org/x/net v0.0.0-20220403103023-749bd193bc2b // indirect
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
|
||||
golang.org/x/sys v0.0.0-20220406163625-3f8b81556e12 // indirect
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
|
||||
golang.org/x/text v0.3.7 // indirect
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/ini.v1 v1.62.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
|
||||
k8s.io/apimachinery v0.23.5 // indirect
|
||||
k8s.io/klog v1.0.0 // indirect
|
||||
k8s.io/klog/v2 v2.60.1 // indirect
|
||||
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect
|
||||
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v3 v3.0.1 // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
|
||||
)
|
||||
|
470
go.sum
470
go.sum
@@ -1,94 +1,73 @@
|
||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
|
||||
github.com/Masterminds/semver v1.4.2 h1:WBLTQ37jOCzSLtXNdoo8bNM8876KhNqOKvrlGITgsTc=
|
||||
github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
|
||||
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
|
||||
github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
|
||||
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
|
||||
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
|
||||
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
|
||||
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8=
|
||||
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
|
||||
github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g=
|
||||
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=
|
||||
github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA=
|
||||
github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8=
|
||||
github.com/alecthomas/kingpin v2.2.6+incompatible h1:5svnBTFgJjZvGKyYBtMB0+m5wvrbUHiqye8wRJMlnYI=
|
||||
github.com/alecthomas/kingpin v2.2.6+incompatible/go.mod h1:59OFYbFVLKQKq+mqrL6Rw5bR0c3ACQaawgXx0QYndlE=
|
||||
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/kong v0.5.0 h1:u8Kdw+eeml93qtMZ04iei0CFYve/WPcA5IFh+9wSskE=
|
||||
github.com/alecthomas/kong v0.5.0/go.mod h1:uzxf/HUh0tj43x1AyJROl3JT7SgsZ5m+icOv1csRhc0=
|
||||
github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8=
|
||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM=
|
||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
|
||||
github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15 h1:AUNCr9CiJuwrRYS3XieqF+Z9B9gNxo/eANAJCF2eiN4=
|
||||
github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE=
|
||||
github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
|
||||
github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
|
||||
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
|
||||
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
|
||||
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
|
||||
github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A=
|
||||
github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU=
|
||||
github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
|
||||
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
|
||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
|
||||
github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ=
|
||||
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
|
||||
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc=
|
||||
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE=
|
||||
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
|
||||
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
|
||||
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
||||
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
||||
github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
|
||||
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
|
||||
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
|
||||
github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
|
||||
github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
|
||||
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
|
||||
github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
|
||||
github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
|
||||
github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g=
|
||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4=
|
||||
github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20=
|
||||
github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg=
|
||||
github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/go-ini/ini v1.46.0 h1:hDJFfs/9f75875scvqLkhNB5Jz5/DybKEOZ5MLF+ng4=
|
||||
github.com/go-ini/ini v1.46.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
|
||||
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o=
|
||||
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
|
||||
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
|
||||
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
|
||||
github.com/go-ini/ini v1.66.4 h1:dKjMqkcbkzfddhIhyglTPgMoJnkvmG+bSLrU9cTHc5M=
|
||||
github.com/go-ini/ini v1.66.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
|
||||
github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
|
||||
github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
|
||||
github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
|
||||
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-ole/go-ole v1.2.4 h1:nNBDSCOigTSiarFpYE9J/KtEA1IOW4CNeqT9TQDqCxI=
|
||||
github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM=
|
||||
github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
|
||||
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
|
||||
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
|
||||
github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0=
|
||||
github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
|
||||
github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
|
||||
github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg=
|
||||
github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8=
|
||||
github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc=
|
||||
github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I=
|
||||
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
|
||||
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
||||
github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw=
|
||||
github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4=
|
||||
github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0=
|
||||
github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY=
|
||||
github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg=
|
||||
@@ -113,382 +92,317 @@ github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWe
|
||||
github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ=
|
||||
github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0=
|
||||
github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw=
|
||||
github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s=
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
|
||||
github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls=
|
||||
github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
|
||||
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/mock v1.3.1-0.20190508161146-9fa652df1129 h1:tT8iWCYw4uOem71yYA3htfH+LNopJvcqZQshm56G5L4=
|
||||
github.com/golang/mock v1.3.1-0.20190508161146-9fa652df1129/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
|
||||
github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc=
|
||||
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
|
||||
github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/golang/snappy v0.0.2-0.20190904063534-ff6b7dc882cf h1:gFVkHXmVAhEbxZVDln5V9GKrLaluNoFHDbrZwAWZgws=
|
||||
github.com/golang/snappy v0.0.2-0.20190904063534-ff6b7dc882cf/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
|
||||
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM=
|
||||
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
|
||||
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g=
|
||||
github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
|
||||
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
||||
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
|
||||
github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
|
||||
github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU=
|
||||
github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA=
|
||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
|
||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
||||
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
|
||||
github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
|
||||
github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
|
||||
github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
|
||||
github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE=
|
||||
github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
|
||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
|
||||
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
|
||||
github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
|
||||
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
|
||||
github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
|
||||
github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
|
||||
github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
|
||||
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
||||
github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
||||
github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
||||
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
|
||||
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/hashicorp/go-version v1.2.1-0.20190424083514-192140e6f3e6 h1:rL76JewpeImeqMtpkAHVZkHrXWt6B5sGSj6sAsL0VnI=
|
||||
github.com/hashicorp/go-version v1.2.1-0.20190424083514-192140e6f3e6/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
||||
github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
|
||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/go-version v1.4.0 h1:aAQzgqIrRKRa7w75CKpbBxYsmUoPjzVm1W59ca1L0J4=
|
||||
github.com/hashicorp/go-version v1.4.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
|
||||
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
|
||||
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
|
||||
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
|
||||
github.com/howeyc/gopass v0.0.0-20170109162249-bf9dde6d0d2c h1:kQWxfPIHVLbgLzphqk3QUflDy9QdksZR4ygR807bpy0=
|
||||
github.com/howeyc/gopass v0.0.0-20170109162249-bf9dde6d0d2c/go.mod h1:lADxMC39cJJqL93Duh1xhAs4I2Zs8mKS89XWXFGp9cs=
|
||||
github.com/howeyc/gopass v0.0.0-20210920133722-c8aef6fb66ef h1:A9HsByNhogrvm9cWb28sjiS3i7tcKCkflWFEkHfuAgM=
|
||||
github.com/howeyc/gopass v0.0.0-20210920133722-c8aef6fb66ef/go.mod h1:lADxMC39cJJqL93Duh1xhAs4I2Zs8mKS89XWXFGp9cs=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg=
|
||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||
github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=
|
||||
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
||||
github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
|
||||
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
|
||||
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
|
||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68=
|
||||
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMWAQ=
|
||||
github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
|
||||
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
|
||||
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
||||
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
|
||||
github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4=
|
||||
github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA=
|
||||
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
|
||||
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
|
||||
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
|
||||
github.com/klauspost/compress v1.10.10 h1:a/y8CglcM7gLGYmlbP/stPE5sR3hbhFRUjCBfd/0B3I=
|
||||
github.com/klauspost/compress v1.10.10/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
|
||||
github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
|
||||
github.com/klauspost/compress v1.15.1 h1:y9FcTHGyrebwfP0ZZqFiaxTaiDnUrGkJkI+f583BL1A=
|
||||
github.com/klauspost/compress v1.15.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
|
||||
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/lib/pq v1.2.0 h1:LXpIM/LZ5xGFhOpXAQUIMM1HdyqzVYM13zNdjCEEcA0=
|
||||
github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
||||
github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM=
|
||||
github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4=
|
||||
github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ=
|
||||
github.com/lib/pq v1.10.4 h1:SO9z7FRPzA03QhHKJrH5BXA6HU1rS4V2nIVrrNC1iYk=
|
||||
github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
||||
github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE=
|
||||
github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0=
|
||||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
||||
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
||||
github.com/mattn/go-shellwords v1.0.6 h1:9Jok5pILi5S1MnDirGVTufYGtksUs/V2BWUP3ZkeUUI=
|
||||
github.com/mattn/go-shellwords v1.0.6/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
||||
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
||||
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
|
||||
github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
|
||||
github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
|
||||
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk=
|
||||
github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y=
|
||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
|
||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
||||
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe h1:iruDEfMl2E6fbMZ9s0scYfZQ84/6SPL6zC8ACM2oIL0=
|
||||
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
|
||||
github.com/montanaflynn/stats v0.6.6 h1:Duep6KMIDpY4Yo11iFsvyqJDyfzLF9+sndUKT+v64GQ=
|
||||
github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow=
|
||||
github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
|
||||
github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg=
|
||||
github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU=
|
||||
github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k=
|
||||
github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w=
|
||||
github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
|
||||
github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
|
||||
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
|
||||
github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs=
|
||||
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
|
||||
github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
|
||||
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
|
||||
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
|
||||
github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=
|
||||
github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74=
|
||||
github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
|
||||
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
|
||||
github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA=
|
||||
github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
|
||||
github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
|
||||
github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
|
||||
github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM=
|
||||
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/pborman/getopt v0.0.0-20190409184431-ee0cd42419d3 h1:YtFkrqsMEj7YqpIhRteVxJxCeC3jJBieuLr0d4C4rSA=
|
||||
github.com/pborman/getopt v0.0.0-20190409184431-ee0cd42419d3/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o=
|
||||
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
|
||||
github.com/pborman/getopt v1.1.0 h1:eJ3aFZroQqq0bWmraivjQNt6Dmm5M0h2JcDW38/Azb0=
|
||||
github.com/pborman/getopt v1.1.0/go.mod h1:FxXoW1Re00sQG/+KIkuSqRL/LwQgSkv7uyac+STFsbk=
|
||||
github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE=
|
||||
github.com/percona/go-mysql v0.0.0-20190903141930-197f4ad8db8d h1:ZkztfR4jYDnkFQtZfwMVm9z7wkK/WiCXRQ7l1CB1/1M=
|
||||
github.com/percona/go-mysql v0.0.0-20190903141930-197f4ad8db8d/go.mod h1:/SGLf9OMxlnK6jq4mkFiImBcJXXk5jwD+lDrwDaGXcw=
|
||||
github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac=
|
||||
github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc=
|
||||
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
|
||||
github.com/percona/go-mysql v0.0.0-20210427141028-73d29c6da78c h1:1SZ7nS+kSaO63IpaKspf/gf8602QcgP2eXNPMNOIc0M=
|
||||
github.com/percona/go-mysql v0.0.0-20210427141028-73d29c6da78c/go.mod h1:/SGLf9OMxlnK6jq4mkFiImBcJXXk5jwD+lDrwDaGXcw=
|
||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
|
||||
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs=
|
||||
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
|
||||
github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og=
|
||||
github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
|
||||
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
||||
github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
||||
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
||||
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
||||
github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA=
|
||||
github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
|
||||
github.com/prometheus/common v0.13.0 h1:vJlpe9wPgDRM1Z+7Wj3zUUjY1nr6/1jNKyl7llliccg=
|
||||
github.com/prometheus/common v0.13.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s=
|
||||
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||
github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
|
||||
github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
|
||||
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
|
||||
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
|
||||
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
|
||||
github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
||||
github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=
|
||||
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
|
||||
github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k=
|
||||
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
||||
github.com/shirou/gopsutil v2.20.8+incompatible h1:8c7Atn0FAUZJo+f4wYbN0iVpdWniCQk7IYwGtgdh1mY=
|
||||
github.com/shirou/gopsutil v2.20.8+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||
github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI=
|
||||
github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
|
||||
github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
|
||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||
github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I=
|
||||
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
|
||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
|
||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
||||
github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=
|
||||
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
|
||||
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
|
||||
github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY=
|
||||
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
|
||||
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||
github.com/smartystreets/assertions v1.2.0 h1:42S6lae5dvLc7BrLu/0ugRtcFVjoJNMC/N3yZFZkDFs=
|
||||
github.com/smartystreets/assertions v1.2.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo=
|
||||
github.com/smartystreets/goconvey v1.7.2 h1:9RBaZCeXEQ3UselpuwUQHltGVXvdwm6cv1hgR6gDIPg=
|
||||
github.com/smartystreets/goconvey v1.7.2/go.mod h1:Vw0tHAZW6lzCRk3xgdin6fKYcG+G3Pg9vgXWeJpQFMM=
|
||||
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
|
||||
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
||||
github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
|
||||
github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
|
||||
github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI=
|
||||
github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
|
||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4=
|
||||
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
|
||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
|
||||
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
|
||||
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
||||
github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw=
|
||||
github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk=
|
||||
github.com/tklauser/numcpus v0.4.0 h1:E53Dm1HjH1/R2/aoCtXtPgzmElmn51aOkhCFSuZq//o=
|
||||
github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ=
|
||||
github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c=
|
||||
github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI=
|
||||
github.com/xdg-go/scram v1.0.2 h1:akYIkZ28e6A96dkWNJQu3nmCzH3YfwMPQExUYDaRv7w=
|
||||
github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs=
|
||||
github.com/xdg-go/scram v1.1.1 h1:VOMT+81stJgXW3CpHyqHN3AXDYIMsx56mEFrB37Mb/E=
|
||||
github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g=
|
||||
github.com/xdg-go/stringprep v1.0.2 h1:6iq84/ryjjeRmMJwxutI51F2GIPlP5BfTvXHeYjyhBc=
|
||||
github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM=
|
||||
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
|
||||
github.com/xdg-go/stringprep v1.0.3 h1:kdwGpVNwPFtjs98xCGkHjQtGKh86rDcRZN17QEMCOIs=
|
||||
github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8=
|
||||
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM6xpdFEAYOk8iySO56hMFq6uLyA=
|
||||
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=
|
||||
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
|
||||
github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a h1:fZHgsYlfvtyqToslyjUt3VOPF4J7aK/3MPcK7xp3PDk=
|
||||
github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a/go.mod h1:ul22v+Nro/R083muKhosV54bj5niojjWZvU8xrevuH4=
|
||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg=
|
||||
github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
|
||||
go.mongodb.org/mongo-driver v1.7.1 h1:jwqTeEM3x6L9xDXrCxN0Hbg7vdGfPBOTIkr0+/LYZDA=
|
||||
go.mongodb.org/mongo-driver v1.7.1/go.mod h1:Q4oFMbo1+MSNqICAdYMlC/zSTrwCogR4R8NzkI+yfU8=
|
||||
go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
|
||||
go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
|
||||
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
|
||||
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
||||
go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
|
||||
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
|
||||
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
||||
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
|
||||
go.mongodb.org/mongo-driver v1.9.0 h1:f3aLGJvQmBl8d9S40IL+jEyBC6hfLPbJjv9t5hEM9ck=
|
||||
go.mongodb.org/mongo-driver v1.9.0/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY=
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
|
||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
|
||||
golang.org/x/crypto v0.0.0-20220331220935-ae2d96664a29 h1:tkVvjkPTB7pnW3jnid7kNyAMPVWllTNOf/qKDze4p9o=
|
||||
golang.org/x/crypto v0.0.0-20220331220935-ae2d96664a29/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
|
||||
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
|
||||
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d h1:20cMwl2fHAzkJMEA+8J4JgqBQcQGzbisXo31MIeenXI=
|
||||
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220403103023-749bd193bc2b h1:vI32FkLJNAWtGD4BwkThwEy6XS7ZLLMHkSkYfF8M0W0=
|
||||
golang.org/x/net v0.0.0-20220403103023-749bd193bc2b/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY=
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a h1:DcqTD9SDLc+1P/r1EmRBwnVsrOwW+kk2vWf9n+1sGhs=
|
||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da h1:b3NXsE2LusjYGGjL5bxEVZZORm/YEFFrWFjR8eFrw/c=
|
||||
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40 h1:JWgyZ1qgdTaF3N3oxC+MdTV7qvEEgHo3otj+HB5CM7Q=
|
||||
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220406163625-3f8b81556e12 h1:QyVthZKMsyaQwBTJE04jdNN0Pp5Fn9Qga0mrgxyERQM=
|
||||
golang.org/x/sys v0.0.0-20220406163625-3f8b81556e12/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
@@ -496,85 +410,99 @@ golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3
|
||||
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s=
|
||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
|
||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
||||
google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM=
|
||||
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
|
||||
google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
|
||||
google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
|
||||
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
|
||||
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
||||
gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU=
|
||||
gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 h1:VpOs+IwYnYBaFnrNAeB8UUWtL3vEUnzSCL1nVjPhqrw=
|
||||
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=
|
||||
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
|
||||
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||
k8s.io/api v0.18.6 h1:osqrAXbOQjkKIWDTjrqxWQ3w0GkKb1KA1XkUGHHYpeE=
|
||||
k8s.io/api v0.18.6/go.mod h1:eeyxr+cwCjMdLAmr2W3RyDI0VvTawSg/3RFFBEnmZGI=
|
||||
k8s.io/api v0.23.5 h1:zno3LUiMubxD/V1Zw3ijyKO3wxrhbUF1Ck+VjBvfaoA=
|
||||
k8s.io/api v0.23.5/go.mod h1:Na4XuKng8PXJ2JsploYYrivXrINeTaycCGcYgF91Xm8=
|
||||
k8s.io/apimachinery v0.18.6 h1:RtFHnfGNfd1N0LeSrKCUznz5xtUP1elRGvHJbL3Ntag=
|
||||
k8s.io/apimachinery v0.18.6/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko=
|
||||
k8s.io/apimachinery v0.23.5 h1:Va7dwhp8wgkUPWsEXk6XglXWU4IKYLKNlv8VkX7SDM0=
|
||||
k8s.io/apimachinery v0.23.5/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM=
|
||||
k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
|
||||
k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
|
||||
k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
|
||||
k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=
|
||||
k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
|
||||
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
|
||||
k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
|
||||
k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
|
||||
k8s.io/klog/v2 v2.60.1 h1:VW25q3bZx9uE3vvdL6M8ezOX79vA2Aq1nEWLqNQclHc=
|
||||
k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
|
||||
k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E=
|
||||
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk=
|
||||
k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||
k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc=
|
||||
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs=
|
||||
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y=
|
||||
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY=
|
||||
sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw=
|
||||
sigs.k8s.io/structured-merge-diff/v3 v3.0.0 h1:dOmIZBMfhcHS09XZkMyUgkq5trg3/jRyJYFZUiaOp8E=
|
||||
sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw=
|
||||
sigs.k8s.io/structured-merge-diff/v3 v3.0.1 h1:ISORLGKzslMY5RWkCSGNy5uDb3OHyEkGEhuSATvSp3A=
|
||||
sigs.k8s.io/structured-merge-diff/v3 v3.0.1/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4=
|
||||
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
|
||||
sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
|
||||
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
|
||||
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
|
||||
|
@@ -326,13 +326,14 @@ sub make_UPDATE {
|
||||
my $types = $self->{tbl_struct}->{type_for};
|
||||
return "UPDATE $self->{dst_db_tbl} SET "
|
||||
. join(', ', map {
|
||||
my $is_hex = ($types->{$_} || '') =~ m/^0x[0-9a-fA-F]+$/i;
|
||||
my $is_char = ($types->{$_} || '') =~ m/char|text|enum/i;
|
||||
my $is_float = ($types->{$_} || '') =~ m/float|double/i;
|
||||
$self->{Quoter}->quote($_)
|
||||
. '='
|
||||
. $self->{Quoter}->quote_val(
|
||||
$row->{$_},
|
||||
is_char => $is_char,
|
||||
is_char => $is_char && !$is_hex,
|
||||
is_float => $is_float,
|
||||
);
|
||||
} grep { !$in_where{$_} } @cols)
|
||||
@@ -407,11 +408,12 @@ sub make_row {
|
||||
. ') VALUES ('
|
||||
. join(', ',
|
||||
map {
|
||||
my $is_char = ($type_for->{$_} || '') =~ m/char|text/i;
|
||||
my $is_hex = ($type_for->{$_} || '') =~ m/^0x[0-9a-fA-F]+$/i;
|
||||
my $is_char = ($type_for->{$_} || '') =~ m/char|text|enum/i;
|
||||
my $is_float = ($type_for->{$_} || '') =~ m/float|double/i;
|
||||
$q->quote_val(
|
||||
$row->{$_},
|
||||
is_char => $is_char,
|
||||
is_char => $is_char && !$is_hex,
|
||||
is_float => $is_float,
|
||||
)
|
||||
} @cols)
|
||||
@@ -431,18 +433,22 @@ sub make_row {
|
||||
sub make_where_clause {
|
||||
my ( $self, $row, $cols ) = @_;
|
||||
my @clauses = map {
|
||||
my $col = $_;
|
||||
$col = $self->{Quoter}->quote($col);
|
||||
|
||||
my $val = $row->{$_};
|
||||
my $sep = defined $val ? '=' : ' IS ';
|
||||
my $is_char = ($self->{tbl_struct}->{type_for}->{$_} || '') =~ m/char|text/i;
|
||||
my $is_char = ($self->{tbl_struct}->{type_for}->{$_} || '') =~ m/char|text|enum/i;
|
||||
my $is_float = ($self->{tbl_struct}->{type_for}->{$_} || '') =~ m/float|double/i;
|
||||
$self->{Quoter}->quote($_) . $sep . $self->{Quoter}->quote_val($val,
|
||||
my $is_crc32 = ($self->{tbl_struct}->{type_for}->{$_} || '') =~ m/binary|text|blob/i;
|
||||
$col = "CRC32($col)" if ($is_crc32);
|
||||
$col . $sep . $self->{Quoter}->quote_val($val,
|
||||
is_char => $is_char,
|
||||
is_float => $is_float);
|
||||
} @$cols;
|
||||
return join(' AND ', @clauses);
|
||||
}
|
||||
|
||||
|
||||
# Sub: get_changes
|
||||
# Get a summary of changes made.
|
||||
#
|
||||
|
@@ -18,7 +18,7 @@
|
||||
# ###########################################################################
|
||||
package Percona::Toolkit;
|
||||
|
||||
our $VERSION = '3.3.2';
|
||||
our $VERSION = '3.4.0';
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
|
@@ -308,6 +308,9 @@ sub make_row_checksum {
|
||||
elsif ( $args{trim} && $type =~ m/varchar/ ) {
|
||||
$result = "TRIM($result)";
|
||||
}
|
||||
elsif ( $type =~ m/binary|text|blob/ ) {
|
||||
$result = "CRC32($result)";
|
||||
}
|
||||
$result;
|
||||
}
|
||||
grep {
|
||||
@@ -335,6 +338,10 @@ sub make_row_checksum {
|
||||
my ($real_col) = m/TRIM\(([^\)]+)\)/;
|
||||
$col .= " AS $real_col";
|
||||
}
|
||||
elsif ( $col =~ m/CRC32/ ) {
|
||||
my ($real_col) = m/CRC32\(([^\)]+)\)/;
|
||||
$col .= " AS $real_col";
|
||||
}
|
||||
$col;
|
||||
} @cols)
|
||||
. ', ';
|
||||
|
@@ -49,10 +49,77 @@ collect() {
|
||||
local d="$1" # directory to save results in
|
||||
local p="$2" # prefix for each result file
|
||||
|
||||
local mysqld_pid=""
|
||||
local cnt=$(($OPT_RUN_TIME / $OPT_SLEEP_COLLECT))
|
||||
|
||||
if [ ! "$OPT_SYSTEM_ONLY" ]; then
|
||||
local mysqld_pid=""
|
||||
local mysql_version=""
|
||||
local mysql_error_log=""
|
||||
local tail_error_log_pid=""
|
||||
local have_lock_waits_table=""
|
||||
local have_oprofile=""
|
||||
local mysqladmin_pid=""
|
||||
local mutex=""
|
||||
local tcpdump_pid=""
|
||||
local ps_instrumentation_enabled=""
|
||||
|
||||
collect_mysql_data_one
|
||||
fi
|
||||
|
||||
# Grab a few general things first. Background all of these so we can start
|
||||
# them all up as quickly as possible.
|
||||
if [ ! "$OPT_MYSQL_ONLY" ]; then
|
||||
collect_system_data
|
||||
fi
|
||||
|
||||
# This loop gathers data for the rest of the duration, and defines the time
|
||||
# of the whole job.
|
||||
log "Loop start: $(date +'TS %s.%N %F %T')"
|
||||
local start_time=$(date +'%s')
|
||||
local curr_time=$start_time
|
||||
local ts="$(date +"TS %s.%N %F %T")"
|
||||
|
||||
while [ $((curr_time - start_time)) -lt $OPT_RUN_TIME ]; do
|
||||
if [ ! "$OPT_MYSQL_ONLY" ]; then
|
||||
collect_system_data_loop
|
||||
fi
|
||||
|
||||
if [ ! "$OPT_SYSTEM_ONLY" ]; then
|
||||
collect_mysql_data_loop
|
||||
fi
|
||||
|
||||
curr_time=$(date +'%s')
|
||||
done
|
||||
log "Loop end: $(date +'TS %s.%N %F %T')"
|
||||
|
||||
if [ ! "$OPT_SYSTEM_ONLY" ]; then
|
||||
collect_mysql_data_two
|
||||
fi
|
||||
|
||||
# Finally, record what system we collected this data from.
|
||||
hostname > "$d/$p-hostname"
|
||||
|
||||
# Remove "empty" files, i.e. ones that are truly empty or
|
||||
# just contain timestamp lines. When a command above fails,
|
||||
# it may leave an empty file. But first wait another --run-time
|
||||
# seconds for any slow process to finish:
|
||||
# https://bugs.launchpad.net/percona-toolkit/+bug/1047701
|
||||
wait_for_subshells $OPT_RUN_TIME
|
||||
kill_all_subshells
|
||||
for file in "$d/$p-"*; do
|
||||
# If there's not at least 1 line that's not a TS,
|
||||
# then the file is empty.
|
||||
if [ -z "$(grep -v '^TS ' --max-count 10 "$file")" ]; then
|
||||
log "Removing empty file $file";
|
||||
rm "$file"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
collect_mysql_data_one() {
|
||||
# Get pidof mysqld.
|
||||
if [ ! "$OPT_MYSQL_ONLY" ]; then
|
||||
port=$(mysql -ss -e 'SELECT @@port')
|
||||
port=$($CMD_MYSQL $EXT_ARGV -ss -e 'SELECT @@port')
|
||||
mysqld_pid=$(lsof -i ":${port}" | grep -i listen | cut -f 3 -d" ")
|
||||
fi
|
||||
|
||||
@@ -84,16 +151,16 @@ collect() {
|
||||
|
||||
# Get the major.minor version number. Version 3.23 doesn't matter for our
|
||||
# purposes, and other releases have x.x.x* version conventions so far.
|
||||
local mysql_version="$(awk '/^version[^_]/{print substr($2,1,3)}' "$d/$p-variables")"
|
||||
mysql_version="$(awk '/^version[^_]/{print substr($2,1,3)}' "$d/$p-variables")"
|
||||
|
||||
# Is MySQL logging its errors to a file? If so, tail that file.
|
||||
local mysql_error_log="$(awk '/^log_error/{print $2}' "$d/$p-variables")"
|
||||
mysql_error_log="$(awk '/^log_error\s/{print $2}' "$d/$p-variables")"
|
||||
if [ -z "$mysql_error_log" -a "$mysqld_pid" ]; then
|
||||
log $mysqld_pid
|
||||
# Try getting it from the open filehandle...
|
||||
mysql_error_log="$(ls -l /proc/$mysqld_pid/fd | awk '/ 2 ->/{print $NF}')"
|
||||
fi
|
||||
|
||||
local tail_error_log_pid=""
|
||||
if [ "$mysql_error_log" -a ! "$OPT_MYSQL_ONLY" ]; then
|
||||
log "The MySQL error log seems to be $mysql_error_log"
|
||||
tail -f "$mysql_error_log" >"$d/$p-log_error" &
|
||||
@@ -101,16 +168,16 @@ collect() {
|
||||
|
||||
# Send a mysqladmin debug to the server so we can potentially learn about
|
||||
# locking etc.
|
||||
$CMD_MYSQLADMIN $EXT_ARGV debug
|
||||
$CMD_MYSQLADMIN $EXT_ARGV
|
||||
else
|
||||
log "Could not find the MySQL error log"
|
||||
fi
|
||||
# Get a sample of these right away, so we can get these without interaction
|
||||
# with the other commands we're about to run.
|
||||
if [ "${mysql_version}" '>' "5.1" ]; then
|
||||
local mutex="SHOW ENGINE INNODB MUTEX"
|
||||
mutex="SHOW ENGINE INNODB MUTEX"
|
||||
else
|
||||
local mutex="SHOW MUTEX STATUS"
|
||||
mutex="SHOW MUTEX STATUS"
|
||||
fi
|
||||
innodb_status 1
|
||||
tokudb_status 1
|
||||
@@ -120,7 +187,6 @@ collect() {
|
||||
open_tables >> "$d/$p-opentables1" &
|
||||
|
||||
# If TCP dumping is specified, start that on the server's port.
|
||||
local tcpdump_pid=""
|
||||
if [ "$CMD_TCPDUMP" -a "$OPT_COLLECT_TCPDUMP" ]; then
|
||||
local port=$(awk '/^port/{print $2}' "$d/$p-variables")
|
||||
if [ "$port" ]; then
|
||||
@@ -131,7 +197,6 @@ collect() {
|
||||
|
||||
# Next, start oprofile gathering data during the whole rest of this process.
|
||||
# The --init should be a no-op if it has already been init-ed.
|
||||
local have_oprofile=""
|
||||
if [ "$CMD_OPCONTROL" -a "$OPT_COLLECT_OPROFILE" ]; then
|
||||
if $CMD_OPCONTROL --init; then
|
||||
$CMD_OPCONTROL --start --no-vmlinux
|
||||
@@ -143,132 +208,123 @@ collect() {
|
||||
local strace_pid=$!
|
||||
fi
|
||||
|
||||
# Grab a few general things first. Background all of these so we can start
|
||||
# them all up as quickly as possible.
|
||||
if [ ! "$OPT_MYSQL_ONLY" ]; then
|
||||
ps -eaF >> "$d/$p-ps" &
|
||||
top -bn${OPT_RUN_TIME} >> "$d/$p-top" &
|
||||
|
||||
[ "$mysqld_pid" ] && _lsof $mysqld_pid >> "$d/$p-lsof" &
|
||||
|
||||
if [ "$CMD_SYSCTL" ]; then
|
||||
$CMD_SYSCTL -a >> "$d/$p-sysctl" &
|
||||
fi
|
||||
|
||||
# collect dmesg events from 60 seconds ago until present
|
||||
if [ "$CMD_DMESG" ]; then
|
||||
local UPTIME=`cat /proc/uptime | awk '{ print $1 }'`
|
||||
local START_TIME=$(echo "$UPTIME 60" | awk '{print ($1 - $2)}')
|
||||
$CMD_DMESG | perl -ne 'm/\[\s*(\d+)\./; if ($1 > '${START_TIME}') { print }' >> "$d/$p-dmesg" &
|
||||
fi
|
||||
|
||||
local cnt=$(($OPT_RUN_TIME / $OPT_SLEEP_COLLECT))
|
||||
if [ "$CMD_VMSTAT" ]; then
|
||||
$CMD_VMSTAT $OPT_SLEEP_COLLECT $cnt >> "$d/$p-vmstat" &
|
||||
$CMD_VMSTAT $OPT_RUN_TIME 2 >> "$d/$p-vmstat-overall" &
|
||||
fi
|
||||
if [ "$CMD_IOSTAT" ]; then
|
||||
$CMD_IOSTAT -dx $OPT_SLEEP_COLLECT $cnt >> "$d/$p-iostat" &
|
||||
$CMD_IOSTAT -dx $OPT_RUN_TIME 2 >> "$d/$p-iostat-overall" &
|
||||
fi
|
||||
if [ "$CMD_MPSTAT" ]; then
|
||||
$CMD_MPSTAT -P ALL $OPT_SLEEP_COLLECT $cnt >> "$d/$p-mpstat" &
|
||||
$CMD_MPSTAT -P ALL $OPT_RUN_TIME 1 >> "$d/$p-mpstat-overall" &
|
||||
fi
|
||||
|
||||
# Collect multiple snapshots of the status variables. We use
|
||||
# mysqladmin -c even though it is buggy and won't stop on its
|
||||
# own in 5.1 and newer, because there is a chance that we will
|
||||
# get and keep a connection to the database; in troubled times
|
||||
# the database tends to exceed max_connections, so reconnecting
|
||||
# in the loop tends not to work very well.
|
||||
$CMD_MYSQLADMIN $EXT_ARGV ext -i$OPT_SLEEP_COLLECT -c$cnt >>"$d/$p-mysqladmin" &
|
||||
local mysqladmin_pid=$!
|
||||
fi
|
||||
|
||||
local have_lock_waits_table=""
|
||||
$CMD_MYSQL $EXT_ARGV -e "SHOW TABLES FROM INFORMATION_SCHEMA" \
|
||||
| grep -i "INNODB_LOCK_WAITS" >/dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
have_lock_waits_table="yes"
|
||||
fi
|
||||
|
||||
# This loop gathers data for the rest of the duration, and defines the time
|
||||
# of the whole job.
|
||||
log "Loop start: $(date +'TS %s.%N %F %T')"
|
||||
local start_time=$(date +'%s')
|
||||
local curr_time=$start_time
|
||||
local ps_instrumentation_enabled=$($CMD_MYSQL $EXT_ARGV -e 'SELECT ENABLED FROM performance_schema.setup_instruments WHERE NAME = "transaction";' \
|
||||
# Collect multiple snapshots of the status variables. We use
|
||||
# mysqladmin -c even though it is buggy and won't stop on its
|
||||
# own in 5.1 and newer, because there is a chance that we will
|
||||
# get and keep a connection to the database; in troubled times
|
||||
# the database tends to exceed max_connections, so reconnecting
|
||||
# in the loop tends not to work very well.
|
||||
$CMD_MYSQLADMIN $EXT_ARGV ext -i$OPT_SLEEP_COLLECT -c$cnt >>"$d/$p-mysqladmin" &
|
||||
mysqladmin_pid=$!
|
||||
|
||||
ps_instrumentation_enabled=$($CMD_MYSQL $EXT_ARGV -e 'SELECT ENABLED FROM performance_schema.setup_instruments WHERE NAME = "transaction";' \
|
||||
| sed "2q;d" | sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/')
|
||||
|
||||
if [ $ps_instrumentation_enabled != "yes" ]; then
|
||||
log "Performance Schema instrumentation is disabled"
|
||||
fi
|
||||
}
|
||||
|
||||
while [ $((curr_time - start_time)) -lt $OPT_RUN_TIME ]; do
|
||||
if [ ! "$OPT_MYSQL_ONLY" ]; then
|
||||
# We check the disk, but don't exit, because we need to stop jobs if we
|
||||
# need to exit.
|
||||
disk_space $d > $d/$p-disk-space
|
||||
check_disk_space \
|
||||
$d/$p-disk-space \
|
||||
"$OPT_DISK_BYTES_FREE" \
|
||||
"$OPT_DISK_PCT_FREE" \
|
||||
|| break
|
||||
collect_system_data() {
|
||||
ps -eaF >> "$d/$p-ps" &
|
||||
top -bn${OPT_RUN_TIME} >> "$d/$p-top" &
|
||||
|
||||
# Sleep between collect cycles.
|
||||
# Synchronize ourselves onto the clock tick, so the sleeps are 1-second
|
||||
sleep $(date +'%s.%N' | awk "{print $OPT_SLEEP_COLLECT - (\$1 % $OPT_SLEEP_COLLECT)}")
|
||||
local ts="$(date +"TS %s.%N %F %T")"
|
||||
[ "$mysqld_pid" ] && _lsof $mysqld_pid >> "$d/$p-lsof" &
|
||||
|
||||
# #####################################################################
|
||||
# Collect data for this cycle.
|
||||
# #####################################################################
|
||||
if [ -d "/proc" ]; then
|
||||
if [ -f "/proc/diskstats" ]; then
|
||||
(echo $ts; cat /proc/diskstats) >> "$d/$p-diskstats" &
|
||||
fi
|
||||
if [ -f "/proc/stat" ]; then
|
||||
(echo $ts; cat /proc/stat) >> "$d/$p-procstat" &
|
||||
fi
|
||||
if [ -f "/proc/vmstat" ]; then
|
||||
(echo $ts; cat /proc/vmstat) >> "$d/$p-procvmstat" &
|
||||
fi
|
||||
if [ -f "/proc/meminfo" ]; then
|
||||
(echo $ts; cat /proc/meminfo) >> "$d/$p-meminfo" &
|
||||
fi
|
||||
if [ -f "/proc/slabinfo" ]; then
|
||||
(echo $ts; cat /proc/slabinfo) >> "$d/$p-slabinfo" &
|
||||
fi
|
||||
if [ -f "/proc/interrupts" ]; then
|
||||
(echo $ts; cat /proc/interrupts) >> "$d/$p-interrupts" &
|
||||
fi
|
||||
fi
|
||||
(echo $ts; df -k) >> "$d/$p-df" &
|
||||
(echo $ts; netstat -antp) >> "$d/$p-netstat" &
|
||||
(echo $ts; netstat -s) >> "$d/$p-netstat_s" &
|
||||
if [ "$CMD_SYSCTL" ]; then
|
||||
$CMD_SYSCTL -a >> "$d/$p-sysctl" &
|
||||
fi
|
||||
|
||||
# collect dmesg events from 60 seconds ago until present
|
||||
if [ "$CMD_DMESG" ]; then
|
||||
local UPTIME=`cat /proc/uptime | awk '{ print $1 }'`
|
||||
local START_TIME=$(echo "$UPTIME 60" | awk '{print ($1 - $2)}')
|
||||
$CMD_DMESG | perl -ne 'm/\[\s*(\d+)\./; if ($1 > '${START_TIME}') { print }' >> "$d/$p-dmesg" &
|
||||
fi
|
||||
|
||||
if [ "$CMD_VMSTAT" ]; then
|
||||
$CMD_VMSTAT $OPT_SLEEP_COLLECT $cnt >> "$d/$p-vmstat" &
|
||||
$CMD_VMSTAT $OPT_RUN_TIME 2 >> "$d/$p-vmstat-overall" &
|
||||
fi
|
||||
if [ "$CMD_IOSTAT" ]; then
|
||||
$CMD_IOSTAT -dx $OPT_SLEEP_COLLECT $cnt >> "$d/$p-iostat" &
|
||||
$CMD_IOSTAT -dx $OPT_RUN_TIME 2 >> "$d/$p-iostat-overall" &
|
||||
fi
|
||||
if [ "$CMD_MPSTAT" ]; then
|
||||
$CMD_MPSTAT -P ALL $OPT_SLEEP_COLLECT $cnt >> "$d/$p-mpstat" &
|
||||
$CMD_MPSTAT -P ALL $OPT_RUN_TIME 1 >> "$d/$p-mpstat-overall" &
|
||||
fi
|
||||
}
|
||||
|
||||
collect_mysql_data_loop() {
|
||||
(echo $ts; $CMD_MYSQL $EXT_ARGV -e "SHOW FULL PROCESSLIST\G") \
|
||||
>> "$d/$p-processlist" &
|
||||
if [ "$have_lock_waits_table" ]; then
|
||||
(echo $ts; lock_waits) >>"$d/$p-lock-waits" &
|
||||
(echo $ts; transactions) >>"$d/$p-transactions" &
|
||||
fi
|
||||
|
||||
if [ "${mysql_version}" '>' "5.6" ] && [ $ps_instrumentation_enabled == "yes" ]; then
|
||||
ps_locks_transactions "$d/$p-ps-locks-transactions"
|
||||
fi
|
||||
|
||||
if [ "${mysql_version}" '>' "5.6" ]; then
|
||||
(echo $ts; ps_prepared_statements) >> "$d/$p-prepared-statements" &
|
||||
fi
|
||||
|
||||
slave_status "$d/$p-slave-status" "${mysql_version}"
|
||||
}
|
||||
|
||||
collect_system_data_loop() {
|
||||
# We check the disk, but don't exit, because we need to stop jobs if we
|
||||
# need to exit.
|
||||
disk_space $d > $d/$p-disk-space
|
||||
check_disk_space \
|
||||
$d/$p-disk-space \
|
||||
"$OPT_DISK_BYTES_FREE" \
|
||||
"$OPT_DISK_PCT_FREE" \
|
||||
|| break
|
||||
|
||||
# Sleep between collect cycles.
|
||||
# Synchronize ourselves onto the clock tick, so the sleeps are 1-second
|
||||
sleep $(date +'%s.%N' | awk "{print $OPT_SLEEP_COLLECT - (\$1 % $OPT_SLEEP_COLLECT)}")
|
||||
ts="$(date +"TS %s.%N %F %T")"
|
||||
|
||||
# #####################################################################
|
||||
# Collect data for this cycle.
|
||||
# #####################################################################
|
||||
if [ -d "/proc" ]; then
|
||||
if [ -f "/proc/diskstats" ]; then
|
||||
(echo $ts; cat /proc/diskstats) >> "$d/$p-diskstats" &
|
||||
fi
|
||||
(echo $ts; $CMD_MYSQL $EXT_ARGV -e "SHOW FULL PROCESSLIST\G") \
|
||||
>> "$d/$p-processlist" &
|
||||
if [ "$have_lock_waits_table" ]; then
|
||||
(echo $ts; lock_waits) >>"$d/$p-lock-waits" &
|
||||
(echo $ts; transactions) >>"$d/$p-transactions" &
|
||||
if [ -f "/proc/stat" ]; then
|
||||
(echo $ts; cat /proc/stat) >> "$d/$p-procstat" &
|
||||
fi
|
||||
|
||||
if [ "${mysql_version}" '>' "5.6" ] && [ $ps_instrumentation_enabled == "yes" ]; then
|
||||
ps_locks_transactions "$d/$p-ps-locks-transactions"
|
||||
if [ -f "/proc/vmstat" ]; then
|
||||
(echo $ts; cat /proc/vmstat) >> "$d/$p-procvmstat" &
|
||||
fi
|
||||
|
||||
if [ "${mysql_version}" '>' "5.6" ]; then
|
||||
(echo $ts; ps_prepared_statements) >> "$d/$p-prepared-statements" &
|
||||
if [ -f "/proc/meminfo" ]; then
|
||||
(echo $ts; cat /proc/meminfo) >> "$d/$p-meminfo" &
|
||||
fi
|
||||
if [ -f "/proc/slabinfo" ]; then
|
||||
(echo $ts; cat /proc/slabinfo) >> "$d/$p-slabinfo" &
|
||||
fi
|
||||
if [ -f "/proc/interrupts" ]; then
|
||||
(echo $ts; cat /proc/interrupts) >> "$d/$p-interrupts" &
|
||||
fi
|
||||
fi
|
||||
(echo $ts; df -k) >> "$d/$p-df" &
|
||||
(echo $ts; netstat -antp) >> "$d/$p-netstat" &
|
||||
(echo $ts; netstat -s) >> "$d/$p-netstat_s" &
|
||||
}
|
||||
|
||||
slave_status "$d/$p-slave-status" "${mysql_version}"
|
||||
|
||||
curr_time=$(date +'%s')
|
||||
done
|
||||
log "Loop end: $(date +'TS %s.%N %F %T')"
|
||||
|
||||
collect_mysql_data_two() {
|
||||
if [ "$have_oprofile" ]; then
|
||||
$CMD_OPCONTROL --stop
|
||||
$CMD_OPCONTROL --dump
|
||||
@@ -316,28 +372,9 @@ collect() {
|
||||
open_tables >> "$d/$p-opentables2" &
|
||||
|
||||
# Kill backgrounded tasks.
|
||||
kill $mysqladmin_pid
|
||||
[ "$mysqladmin_pid" ] && kill $mysqladmin_pid
|
||||
[ "$tail_error_log_pid" ] && kill $tail_error_log_pid
|
||||
[ "$tcpdump_pid" ] && kill $tcpdump_pid
|
||||
|
||||
# Finally, record what system we collected this data from.
|
||||
hostname > "$d/$p-hostname"
|
||||
|
||||
# Remove "empty" files, i.e. ones that are truly empty or
|
||||
# just contain timestamp lines. When a command above fails,
|
||||
# it may leave an empty file. But first wait another --run-time
|
||||
# seconds for any slow process to finish:
|
||||
# https://bugs.launchpad.net/percona-toolkit/+bug/1047701
|
||||
wait_for_subshells $OPT_RUN_TIME
|
||||
kill_all_subshells
|
||||
for file in "$d/$p-"*; do
|
||||
# If there's not at least 1 line that's not a TS,
|
||||
# then the file is empty.
|
||||
if [ -z "$(grep -v '^TS ' --max-count 10 "$file")" ]; then
|
||||
log "Removing empty file $file";
|
||||
rm "$file"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
open_tables() {
|
||||
@@ -345,7 +382,7 @@ open_tables() {
|
||||
if [ -n "$open_tables" -a $open_tables -le 1000 ]; then
|
||||
$CMD_MYSQL $EXT_ARGV -e 'SHOW OPEN TABLES' &
|
||||
else
|
||||
log "Too many open tables: $open_tables"
|
||||
log "Logging disabled due to having over 1000 tables open. Number of tables currently open: $open_tables"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -391,8 +428,13 @@ transactions() {
|
||||
tokudb_status() {
|
||||
local n=$1
|
||||
|
||||
$CMD_MYSQL $EXT_ARGV -e "SHOW ENGINE TOKUDB STATUS\G" \
|
||||
>> "$d/$p-tokudbstatus$n" || rm -f "$d/$p-tokudbstatus$n"
|
||||
has_tokudb=`$CMD_MYSQL $EXT_ARGV -e "SHOW ENGINES" | grep -i 'tokudb'`
|
||||
exit_code=$?
|
||||
|
||||
if [ $exit_code -eq 0 ]; then
|
||||
$CMD_MYSQL $EXT_ARGV -e "SHOW ENGINE TOKUDB STATUS\G" \
|
||||
>> "$d/$p-tokudbstatus$n" || rm -f "$d/$p-tokudbstatus$n"
|
||||
fi
|
||||
}
|
||||
|
||||
innodb_status() {
|
||||
@@ -475,11 +517,11 @@ slave_status() {
|
||||
echo -e "\n$sql\n" >> $outfile
|
||||
$CMD_MYSQL $EXT_ARGV -e "$sql" >> $outfile
|
||||
|
||||
sql="SELECT * FROM replication_connection_status\G"
|
||||
sql="SELECT * FROM performance_schema.replication_connection_status\G"
|
||||
echo -e "\n$sql\n" >> $outfile
|
||||
$CMD_MYSQL $EXT_ARGV -e "$sql" >> $outfile
|
||||
|
||||
sql="SELECT * FROM replication_applier_status JOIN replication_applier_status_by_coordinator USING(channel_name)\G"
|
||||
sql="SELECT * FROM performance_schema.replication_applier_status JOIN performance_schema.replication_applier_status_by_coordinator USING(channel_name)\G"
|
||||
echo -e "\n$sql\n" >> $outfile
|
||||
$CMD_MYSQL $EXT_ARGV -e "$sql" >> $outfile
|
||||
fi
|
||||
|
@@ -295,6 +295,7 @@ fi
|
||||
case $opt in
|
||||
start)
|
||||
cd $PERCONA_TOOLKIT_BRANCH/sandbox
|
||||
echo "${2:-"master"}" 12345
|
||||
./start-sandbox "${2:-"master"}" 12345
|
||||
exit_status=$((exit_status | $?))
|
||||
set_mysql_version
|
||||
|
@@ -1,7 +1,13 @@
|
||||
.PHONY: all style format build test vet tarball linux-amd64 clean help
|
||||
|
||||
help: ## Display this help message.
|
||||
@echo "Please use \`make <target>\` where <target> is one of:"
|
||||
@grep '^[a-zA-Z]' $(MAKEFILE_LIST) | \
|
||||
awk -F ':.*?## ' 'NF==2 {printf " %-26s%s\n", $$1, $$2}'
|
||||
@echo
|
||||
@echo 'To build binaries use: VERSION=m.n.p make <target>'
|
||||
@echo 'Example: VERSION=3.4.0 make linux-amd64'
|
||||
@echo 'The binaries generation uses pwd command to set the base directory. Please run make from the same directory where the Makefile is located.'
|
||||
|
||||
DATE_FMT = +%FT%T%z
|
||||
ifdef SOURCE_DATE_EPOCH
|
||||
@@ -12,17 +18,19 @@ endif
|
||||
|
||||
GO := go
|
||||
pkgs = $(shell find . -type d -name "pt-*" -exec basename {} \;)
|
||||
VERSION=$(shell git describe --abbrev=0 --tags)
|
||||
BUILD=$(BUILD_DATE)
|
||||
GOVERSION=$(shell go version | cut --delimiter=" " -f3)
|
||||
COMMIT=$(shell git rev-list -1 HEAD)
|
||||
GOUTILSDIR ?= $(GOPATH)/bin
|
||||
FILES = $(shell find . -type f -name '*.go' -not -path "./vendor/*")
|
||||
|
||||
PREFIX=$(shell pwd)
|
||||
TOP_DIR=$(shell git rev-parse --show-toplevel)
|
||||
BIN_DIR=$(shell git rev-parse --show-toplevel)/bin
|
||||
SRC_DIR=$(shell git rev-parse --show-toplevel)/src/go
|
||||
|
||||
CUR_DIR=$(shell pwd)
|
||||
COMMIT=$(shell git rev-list -1 HEAD)
|
||||
|
||||
TOP_DIR=${CUR_DIR}
|
||||
BIN_DIR=${CUR_DIR}/../../bin
|
||||
SRC_DIR=${CUR_DIR}/../../src/go
|
||||
|
||||
LDFLAGS="-X main.Version=${VERSION} -X main.Build=${BUILD} -X main.GoVersion=${GOVERSION} -X main.Commit=${COMMIT} -s -w"
|
||||
|
||||
TEST_PSMDB_VERSION?=4.0
|
||||
@@ -65,7 +73,6 @@ MINIO_SECRET_ACCESS_KEY=secret00000
|
||||
export MINIO_ACCESS_KEY_ID
|
||||
export MINIO_SECRET_ACCESS_KEY
|
||||
|
||||
.PHONY: all style format build test vet tarball linux-amd64
|
||||
|
||||
$(GOUTILSDIR)/dep:
|
||||
go get -u github.com/golang/dep/cmd/dep
|
||||
@@ -116,20 +123,20 @@ env-down: env ## Clean-up MongoDB docker containers cluster
|
||||
docker-compose down -v
|
||||
rm .env
|
||||
|
||||
linux-amd64: ## Build Mongo tools for linux-amd64
|
||||
@echo "Building linux/amd64 binaries in ${BIN_DIR}"
|
||||
linux-amd64: ## Build Mongo tools for linux-amd64.
|
||||
@echo "Building linux/amd64 binaries in ${BIN_DIR} as version ${VERSION}"
|
||||
@cd ${TOP_DIR} && go get ./...
|
||||
@$(foreach pkg,$(pkgs),rm -f ${BIN_DIR}/$(pkg) 2> /dev/null;)
|
||||
@$(foreach pkg,$(pkgs),GOOS=linux GOARCH=amd64 go build -ldflags ${LDFLAGS} -o ${BIN_DIR}/$(pkg) ./$(pkg);)
|
||||
|
||||
linux-386: ## Build Mongo tools for linux-386
|
||||
@echo "Building linux/386 binaries in ${BIN_DIR}"
|
||||
@echo "Building linux/386 binaries in ${BIN_DIR} as version ${VERSION}"
|
||||
@cd ${TOP_DIR} && go get ./...
|
||||
@$(foreach pkg,$(pkgs),rm -f ${BIN_DIR}/$(pkg) 2> /dev/null;)
|
||||
@$(foreach pkg,$(pkgs),GOOS=linux GOARCH=386 go build -ldflags ${LDFLAGS} -o ${BIN_DIR}/$(pkg) ./$(pkg);)
|
||||
|
||||
darwin-amd64: ## Build Mongo tools for darwin-amd64 (MacOS)
|
||||
@echo "Building darwin/amd64 binaries in ${BIN_DIR}"
|
||||
@echo "Building darwin/amd64 binaries in ${BIN_DIR} as version ${VERSION}"
|
||||
@cd ${TOP_DIR} && go get ./...
|
||||
@$(foreach pkg,$(pkgs),rm -f ${BIN_DIR}/$(pkg) 2> /dev/null;)
|
||||
@$(foreach pkg,$(pkgs),GOOS=darwin GOARCH=amd64 go build -ldflags ${LDFLAGS} -o ${BIN_DIR}/$(pkg) ./$(pkg);)
|
||||
|
@@ -1,22 +1,21 @@
|
||||
package proto
|
||||
|
||||
type ShardStas struct {
|
||||
Ns string `json:"ns"`
|
||||
Count int64 `json:"count"`
|
||||
Size int64 `json:"size"`
|
||||
AvgObjSize int64 `json:"avgObjSize"`
|
||||
NumExtents int64 `json:"numExtents"`
|
||||
StorageSize int64 `json:"storageSize"`
|
||||
LastExtentSize int64 `json:"lastExtentSize"`
|
||||
PaddingFactor int64 `json:"paddingFactor"`
|
||||
PaddingFactorNote string `json:"paddingFactorNote"`
|
||||
UserFlags int64 `json:"userFlags"`
|
||||
Capped bool `json:"capped"`
|
||||
Nindexes int64 `json:"nindexes"`
|
||||
IndexDetails struct {
|
||||
} `json:"indexDetails"`
|
||||
TotalIndexSize int64 `json:"totalIndexSize"`
|
||||
IndexSizes struct {
|
||||
Ns string `json:"ns"`
|
||||
Count int64 `json:"count"`
|
||||
Size int64 `json:"size"`
|
||||
AvgObjSize int64 `json:"avgObjSize"`
|
||||
NumExtents int64 `json:"numExtents"`
|
||||
StorageSize int64 `json:"storageSize"`
|
||||
LastExtentSize int64 `json:"lastExtentSize"`
|
||||
PaddingFactor int64 `json:"paddingFactor"`
|
||||
PaddingFactorNote string `json:"paddingFactorNote"`
|
||||
UserFlags int64 `json:"userFlags"`
|
||||
Capped bool `json:"capped"`
|
||||
Nindexes int64 `json:"nindexes"`
|
||||
IndexDetails struct{} `json:"indexDetails"`
|
||||
TotalIndexSize int64 `json:"totalIndexSize"`
|
||||
IndexSizes struct {
|
||||
ID int64 `json:"_id_"`
|
||||
IDHashed int64 `json:"_id_hashed"`
|
||||
} `json:"indexSizes"`
|
||||
|
@@ -3,13 +3,13 @@ package util
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"log"
|
||||
"sort"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/percona/percona-toolkit/src/go/mongolib/proto"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/prometheus/common/log"
|
||||
"github.com/shirou/gopsutil/process"
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
@@ -390,7 +390,7 @@ func GetClientForHost(co *options.ClientOptions, newHost string) (*mongo.Client,
|
||||
func GetHostInfo(ctx context.Context, client *mongo.Client) (*proto.GetHostInfo, error) {
|
||||
hi := proto.HostInfo{}
|
||||
if err := client.Database("admin").RunCommand(ctx, primitive.M{"hostInfo": 1}).Decode(&hi); err != nil {
|
||||
log.Debugf("run('hostInfo') error: %s", err)
|
||||
log.Printf("run('hostInfo') error: %s", err)
|
||||
return nil, errors.Wrap(err, "GetHostInfo.hostInfo")
|
||||
}
|
||||
|
||||
@@ -480,9 +480,6 @@ func MyState(ctx context.Context, client *mongo.Client) (int, error) {
|
||||
var ms proto.MyState
|
||||
|
||||
err := client.Database("admin").RunCommand(ctx, bson.M{"getDiagnosticData": 1}).Decode(&ms)
|
||||
if _, ok := err.(topology.ServerSelectionError); ok {
|
||||
return 0, nil
|
||||
}
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
@@ -72,7 +72,7 @@ func New(location, namespace, resource string) Dumper {
|
||||
cmd: "kubectl",
|
||||
resources: resources,
|
||||
location: "cluster-dump",
|
||||
mode: int64(0777),
|
||||
mode: int64(0o777),
|
||||
namespace: namespace,
|
||||
crType: resource,
|
||||
}
|
||||
|
48
src/go/pt-mongodb-index-check/README.md
Normal file
48
src/go/pt-mongodb-index-check/README.md
Normal file
@@ -0,0 +1,48 @@
|
||||
# pt-mongodb-index-check
|
||||
|
||||
|
||||
|
||||
## Introduction
|
||||
|
||||
This tool can perform checks on MongoDB indexes.
|
||||
|
||||
Currently, these checks are available:
|
||||
|
||||
### Duplicated indexes
|
||||
|
||||
Check for indexes that are the prefix of other indexes. For example if we have these 2 indexes
|
||||
|
||||
```
|
||||
db.getSiblingDB("testdb").test_col.createIndex({"f1": 1, "f2": -1, "f3": 1, "f4": 1}, {"name": "idx_01"});
|
||||
db.getSiblingDB("testdb").test_col.createIndex({"f1": 1, "f2": -1, "f3": 1}, {"name": "idx_02"});
|
||||
```
|
||||
|
||||
The index `idx_02` is the prefix of `idx_01` because it has the same keys in the same order so, `idx_02` can be dropped.
|
||||
|
||||
### Unused indexes.
|
||||
|
||||
This check gets the `$indexstats` for all indexes and reports those having `accesses.ops` = 0.
|
||||
|
||||
## Usage
|
||||
|
||||
Run the program as `pt-mongodb-index-check <command> [flags]`
|
||||
|
||||
#### Available commands
|
||||
|
||||
| Command | Description |
|
||||
| ---------------- | ---------------------------------- |
|
||||
| check-duplicated | Run checks for duplicated indexes. |
|
||||
| check-unused | Run check for unused indexes. |
|
||||
| check-all | Run all checks |
|
||||
|
||||
#### Available flags
|
||||
|
||||
| Flag | Description |
|
||||
| ---- | ----------- |
|
||||
|--all-databases|Check in all databases excluding system dbs.|
|
||||
|--databases=DATABASES,...|Comma separated list of databases to check.|
|
||||
|--all-collections|Check in all collections in the selected databases.|
|
||||
|--collections=COLLECTIONS,...|Comma separated list of collections to check.|
|
||||
|--mongodb.uri=<connection string>|Connection URI|
|
||||
|--json|Show output as JSON|
|
||||
|
103
src/go/pt-mongodb-index-check/indexes/duplicated.go
Normal file
103
src/go/pt-mongodb-index-check/indexes/duplicated.go
Normal file
@@ -0,0 +1,103 @@
|
||||
package indexes
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
)
|
||||
|
||||
type collectionIndex struct {
|
||||
Name string `bson:"name"`
|
||||
Namespace string `bson:"ns"`
|
||||
V int `bson:"v"`
|
||||
Key primitive.D `bson:"key"`
|
||||
}
|
||||
|
||||
func (di collectionIndex) ComparableKey() string {
|
||||
str := ""
|
||||
for _, elem := range di.Key {
|
||||
str += sign(elem) + elem.Key
|
||||
}
|
||||
return str
|
||||
}
|
||||
|
||||
func sign(elem primitive.E) string {
|
||||
sign := "+"
|
||||
switch elem.Value.(type) {
|
||||
case int32: // internal MongoDB indexes like _id_ or lastUsed have the sign field as int32.
|
||||
if elem.Value.(int32) < 0 {
|
||||
sign = "-"
|
||||
}
|
||||
case float64: // All other indexes have the sign field as float64.
|
||||
if elem.Value.(float64) < 0 {
|
||||
sign = "-"
|
||||
}
|
||||
}
|
||||
return sign
|
||||
}
|
||||
|
||||
// IndexKey holds the list of fields that are part of an index, along with the field order.
|
||||
type IndexKey []primitive.E
|
||||
|
||||
// String returns the index fields as a string. The + sign means ascending on this field
|
||||
// and a - sign indicates a descending order for that field.
|
||||
func (di IndexKey) String() string {
|
||||
str := ""
|
||||
for _, elem := range di {
|
||||
str += sign(elem) + elem.Key + " "
|
||||
}
|
||||
|
||||
return str
|
||||
}
|
||||
|
||||
// DuplicateIndex represents a duplicated index pair.
|
||||
// An index is considered as the duplicate of another one if it is it's prefix.
|
||||
// Example: the index +f1-f2 is the prefix of +f1-f2+f3.
|
||||
type Duplicate struct {
|
||||
Namespace string
|
||||
Name string
|
||||
Key IndexKey
|
||||
ContainerName string
|
||||
ContainerKey IndexKey
|
||||
}
|
||||
|
||||
func FindDuplicated(ctx context.Context, client *mongo.Client, database, collection string) ([]Duplicate, error) {
|
||||
di := []Duplicate{}
|
||||
|
||||
cursor, err := client.Database(database).Collection(collection).Indexes().List(ctx, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var results []collectionIndex
|
||||
if err = cursor.All(context.TODO(), &results); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
sort.Slice(results, func(i, j int) bool {
|
||||
return results[i].ComparableKey() < results[j].ComparableKey()
|
||||
})
|
||||
|
||||
for i := 0; i < len(results)-1; i++ {
|
||||
for j := i + 1; j < len(results); j++ {
|
||||
if strings.HasPrefix(results[j].ComparableKey(), results[i].ComparableKey()) {
|
||||
idx := Duplicate{
|
||||
Namespace: database + "." + collection,
|
||||
Name: results[i].Name,
|
||||
Key: make([]primitive.E, len(results[i].Key)),
|
||||
ContainerName: results[j].Name,
|
||||
ContainerKey: make([]primitive.E, len(results[j].Key)),
|
||||
}
|
||||
copy(idx.Key, results[i].Key)
|
||||
copy(idx.ContainerKey, results[j].Key)
|
||||
di = append(di, idx)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return di, nil
|
||||
}
|
117
src/go/pt-mongodb-index-check/indexes/duplicated_test.go
Normal file
117
src/go/pt-mongodb-index-check/indexes/duplicated_test.go
Normal file
@@ -0,0 +1,117 @@
|
||||
package indexes
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/AlekSi/pointer"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
"go.mongodb.org/mongo-driver/mongo/options"
|
||||
"gopkg.in/mgo.v2/bson"
|
||||
|
||||
tu "github.com/percona/percona-toolkit/src/go/internal/testutils"
|
||||
)
|
||||
|
||||
func TestDuplicateIndexes(t *testing.T) {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
||||
defer cancel()
|
||||
|
||||
client, err := tu.TestClient(ctx, tu.MongoDBShard1PrimaryPort)
|
||||
if err != nil {
|
||||
t.Fatalf("cannot get a new MongoDB client: %s", err)
|
||||
}
|
||||
|
||||
dbname := "test_db"
|
||||
collname := "test_col"
|
||||
|
||||
database := client.Database(dbname)
|
||||
database.Drop(ctx) //nolint:errcheck
|
||||
defer database.Drop(ctx) //nolint:errcheck
|
||||
|
||||
_, err = database.Collection(collname).InsertOne(ctx, bson.M{"f1": 1, "f2": "2", "f3": "a", "f4": "c"})
|
||||
assert.NoError(t, err)
|
||||
|
||||
testCases := []primitive.D{
|
||||
{{"f1", 1}, {"f2", -1}, {"f3", 1}, {"f4", 1}},
|
||||
{{"f1", 1}, {"f2", -1}, {"f3", 1}, {"f4", 1}}, // this will throw a duplicate index error
|
||||
{{"f1", 1}, {"f2", -1}, {"f3", 1}},
|
||||
{{"f1", 1}, {"f2", -1}},
|
||||
{{"f3", -1}},
|
||||
}
|
||||
|
||||
errCount := 0
|
||||
for i, tc := range testCases {
|
||||
mod := mongo.IndexModel{
|
||||
Keys: tc,
|
||||
Options: &options.IndexOptions{
|
||||
Name: pointer.ToString(fmt.Sprintf("idx_%02d", i)),
|
||||
},
|
||||
}
|
||||
_, err := database.Collection(collname).Indexes().CreateOne(ctx, mod)
|
||||
if err != nil {
|
||||
errCount++
|
||||
}
|
||||
}
|
||||
/*
|
||||
At this point we have 5 indexes: _id: (MongoDB's default), idx_00, idx_02, idx_03, idx_04.
|
||||
idx_01 wasn't created since it duplicates idx_00 and errCount=1.
|
||||
*/
|
||||
|
||||
assert.Equal(t, 1, errCount)
|
||||
|
||||
want := []Duplicate{
|
||||
{
|
||||
Name: "idx_03",
|
||||
Namespace: "test_db.test_col",
|
||||
Key: IndexKey{
|
||||
{Key: "f1", Value: int32(1)},
|
||||
{Key: "f2", Value: int32(-1)},
|
||||
},
|
||||
ContainerName: "idx_02",
|
||||
ContainerKey: IndexKey{
|
||||
{Key: "f1", Value: int32(1)},
|
||||
{Key: "f2", Value: int32(-1)},
|
||||
{Key: "f3", Value: int32(1)},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "idx_03",
|
||||
Namespace: "test_db.test_col",
|
||||
Key: IndexKey{
|
||||
{Key: "f1", Value: int32(1)},
|
||||
{Key: "f2", Value: int32(-1)},
|
||||
},
|
||||
ContainerName: "idx_00",
|
||||
ContainerKey: IndexKey{
|
||||
{Key: "f1", Value: int32(1)},
|
||||
{Key: "f2", Value: int32(-1)},
|
||||
{Key: "f3", Value: int32(1)},
|
||||
{Key: "f4", Value: int32(1)},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "idx_02",
|
||||
Namespace: "test_db.test_col",
|
||||
Key: IndexKey{
|
||||
{Key: "f1", Value: int32(1)},
|
||||
{Key: "f2", Value: int32(-1)},
|
||||
{Key: "f3", Value: int32(1)},
|
||||
},
|
||||
ContainerName: "idx_00",
|
||||
ContainerKey: IndexKey{
|
||||
{Key: "f1", Value: int32(1)},
|
||||
{Key: "f2", Value: int32(-1)},
|
||||
{Key: "f3", Value: int32(1)},
|
||||
{Key: "f4", Value: int32(1)},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
di, err := FindDuplicated(ctx, client, dbname, collname)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, want, di)
|
||||
}
|
62
src/go/pt-mongodb-index-check/indexes/unused.go
Normal file
62
src/go/pt-mongodb-index-check/indexes/unused.go
Normal file
@@ -0,0 +1,62 @@
|
||||
package indexes
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
"gopkg.in/mgo.v2/bson"
|
||||
)
|
||||
|
||||
var systemDBs = []string{"admin", "config", "local", "system.profile"} //nolint:gochecknoglobals
|
||||
// IndexStat hold an index usage statistics.
|
||||
type IndexStat struct {
|
||||
Accesses struct {
|
||||
Ops int64 `bson:"ops"`
|
||||
Since primitive.DateTime `bson:"since"`
|
||||
} `bson:"accesses"`
|
||||
Spec struct {
|
||||
Name string `bson:"name"`
|
||||
Namespace string `bson:"ns"`
|
||||
V int32 `bson:"v"`
|
||||
Key primitive.D `bson:"key"`
|
||||
} `bson:"spec"`
|
||||
Name string `bson:"name"`
|
||||
Key primitive.D `bson:"key"`
|
||||
Host string `bson:"host"`
|
||||
}
|
||||
|
||||
func in(search string, items []string) bool {
|
||||
for _, item := range items {
|
||||
if search == item {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// FindUnusedIndexes returns a list of unused indexes for the given database and collection.
|
||||
func FindUnused(ctx context.Context, client *mongo.Client, database, collection string) ([]IndexStat, error) {
|
||||
aggregation := mongo.Pipeline{
|
||||
{{Key: "$indexStats", Value: primitive.M{}}},
|
||||
{{Key: "$match", Value: primitive.M{"accesses.ops": 0}}},
|
||||
{{Key: "$match", Value: primitive.M{"name": bson.M{"$ne": "_id_"}}}},
|
||||
}
|
||||
|
||||
if in(database, systemDBs) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
cursor, err := client.Database(database).Collection(collection).Aggregate(ctx, aggregation)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "cannot run $indexStats for unused indexes")
|
||||
}
|
||||
|
||||
var stats []IndexStat
|
||||
if err = cursor.All(ctx, &stats); err != nil {
|
||||
return nil, errors.Wrap(err, "cannot get $indexStats for unused indexes")
|
||||
}
|
||||
|
||||
return stats, nil
|
||||
}
|
82
src/go/pt-mongodb-index-check/indexes/unused_test.go
Normal file
82
src/go/pt-mongodb-index-check/indexes/unused_test.go
Normal file
@@ -0,0 +1,82 @@
|
||||
package indexes
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"sort"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/AlekSi/pointer"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
"go.mongodb.org/mongo-driver/mongo/options"
|
||||
"gopkg.in/mgo.v2/bson"
|
||||
|
||||
tu "github.com/percona/percona-toolkit/src/go/internal/testutils"
|
||||
)
|
||||
|
||||
func TestUnusedIndexes(t *testing.T) {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
||||
defer cancel()
|
||||
|
||||
client, err := tu.TestClient(ctx, tu.MongoDBShard1PrimaryPort)
|
||||
if err != nil {
|
||||
t.Fatalf("cannot get a new MongoDB client: %s", err)
|
||||
}
|
||||
|
||||
dbname := "test_db"
|
||||
collname := "test_col"
|
||||
|
||||
database := client.Database(dbname)
|
||||
database.Drop(ctx) //nolint:errcheck
|
||||
defer database.Drop(ctx) //nolint:errcheck
|
||||
|
||||
testCases := []primitive.D{
|
||||
{{"f1", 1}, {"f2", -1}, {"f3", 1}, {"f4", 1}},
|
||||
{{"f3", -1}},
|
||||
{{"f4", -1}},
|
||||
}
|
||||
|
||||
errCount := 0
|
||||
for i, tc := range testCases {
|
||||
mod := mongo.IndexModel{
|
||||
Keys: tc,
|
||||
Options: &options.IndexOptions{
|
||||
Name: pointer.ToString(fmt.Sprintf("idx_%02d", i)),
|
||||
},
|
||||
}
|
||||
_, err := database.Collection(collname).Indexes().CreateOne(ctx, mod)
|
||||
if err != nil {
|
||||
errCount++
|
||||
}
|
||||
}
|
||||
|
||||
for i := 0; i < 100; i++ {
|
||||
_, err = database.Collection(collname).InsertOne(ctx,
|
||||
bson.M{"f1": rand.Int63n(1000), "f2": rand.Int63n(1000), "f3": rand.Int63n(1000), "f4": rand.Int63n(1000)})
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
|
||||
// Make use of idx_02: {"f4": -1} to exclude it from the results so we ensure only unused indexes
|
||||
// are being listed.
|
||||
_, err = database.Collection(collname).Find(ctx, primitive.M{"f4": primitive.M{"$gt": 500}})
|
||||
assert.NoError(t, err)
|
||||
|
||||
want := []string{"idx_00", "idx_01"}
|
||||
|
||||
ui, err := FindUnused(ctx, client, dbname, collname)
|
||||
assert.NoError(t, err)
|
||||
|
||||
got := make([]string, 0, len(ui))
|
||||
for _, idx := range ui {
|
||||
// compare only names because the index struct has a timestamp in it and it is variable.
|
||||
got = append(got, idx.Name)
|
||||
}
|
||||
|
||||
sort.Strings(got)
|
||||
|
||||
assert.Equal(t, want, got)
|
||||
}
|
188
src/go/pt-mongodb-index-check/main.go
Normal file
188
src/go/pt-mongodb-index-check/main.go
Normal file
@@ -0,0 +1,188 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
"text/template"
|
||||
"time"
|
||||
|
||||
"github.com/alecthomas/kong"
|
||||
"github.com/pkg/errors"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
"go.mongodb.org/mongo-driver/mongo/options"
|
||||
|
||||
"github.com/percona/percona-toolkit/src/go/pt-mongodb-index-check/indexes"
|
||||
"github.com/percona/percona-toolkit/src/go/pt-mongodb-index-check/templates"
|
||||
)
|
||||
|
||||
type cmdlineArgs struct {
|
||||
CheckUnused struct{} `cmd:"" name:"check-unused" help:"Check for unused indexes."`
|
||||
CheckDuplicated struct{} `cmd:"" name:"check-duplicates" help:"Check for duplicated indexes."`
|
||||
CheckAll struct{} `cmd:"" name:"check-all" help:"Check for unused and duplicated indexes."`
|
||||
ShowHelp struct{} `cmd:"" default:"1"`
|
||||
Version struct{} `cmd:"" name:"version"`
|
||||
|
||||
AllDatabases bool `name:"all-databases" xor:"db" help:"Check in all databases excluding system dbs"`
|
||||
Databases []string `name:"databases" xor:"db" help:"Comma separated list of databases to check"`
|
||||
|
||||
AllCollections bool `name:"all-collections" xor:"colls" help:"Check in all collections in the selected databases."`
|
||||
Collections []string `name:"collections" xor:"colls" help:"Comma separated list of collections to check"`
|
||||
URI string `name:"mongodb.uri" required:"" placeholder:"mongodb://host:port/admindb?options" help:"Connection URI"`
|
||||
JSON bool `name:"json" help:"Show output as JSON"`
|
||||
}
|
||||
|
||||
type response struct {
|
||||
Unused []indexes.IndexStat
|
||||
Duplicated []indexes.Duplicate
|
||||
}
|
||||
|
||||
const (
|
||||
TOOLNAME = "pt-mongodb-index-check"
|
||||
)
|
||||
|
||||
var (
|
||||
Build string = "2020-04-23" //nolint
|
||||
GoVersion string = "1.14.1" //nolint
|
||||
Version string = "3.4.0" //nolint
|
||||
Commit string //nolint
|
||||
)
|
||||
|
||||
func main() {
|
||||
var args cmdlineArgs
|
||||
kongctx := kong.Parse(&args, kong.UsageOnError())
|
||||
|
||||
if kongctx.Command() == "version" {
|
||||
fmt.Println(TOOLNAME)
|
||||
fmt.Printf("Version %s\n", Version)
|
||||
fmt.Printf("Build: %s using %s\n", Build, GoVersion)
|
||||
fmt.Printf("Commit: %s\n", Commit)
|
||||
return
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 20*time.Second)
|
||||
defer cancel()
|
||||
|
||||
if !strings.HasPrefix(args.URI, "mongodb") && !strings.HasPrefix(args.URI, "mongodb+srv") {
|
||||
args.URI = "mongodb://" + args.URI
|
||||
}
|
||||
|
||||
client, err := mongo.Connect(ctx, options.Client().ApplyURI(args.URI))
|
||||
if err != nil {
|
||||
log.Fatalf("Cannot connect to the database: %q", err)
|
||||
}
|
||||
|
||||
if args.AllDatabases {
|
||||
args.Databases, err = client.ListDatabaseNames(context.TODO(), primitive.D{})
|
||||
if err != nil {
|
||||
log.Fatalf("cannot list all databases: %s", err)
|
||||
}
|
||||
}
|
||||
if args.AllCollections {
|
||||
args.Collections = nil
|
||||
}
|
||||
|
||||
resp := response{}
|
||||
|
||||
switch kongctx.Command() {
|
||||
case "check-unused":
|
||||
resp.Unused = findUnused(ctx, client, args.Databases, args.Collections)
|
||||
case "check-duplicates":
|
||||
resp.Duplicated = findDuplicated(ctx, client, args.Databases, args.Collections)
|
||||
case "check-all":
|
||||
resp.Unused = findUnused(ctx, client, args.Databases, args.Collections)
|
||||
resp.Duplicated = findDuplicated(ctx, client, args.Databases, args.Collections)
|
||||
default:
|
||||
kong.DefaultHelpPrinter(kong.HelpOptions{}, kongctx)
|
||||
}
|
||||
|
||||
fmt.Println(output(resp, args.JSON))
|
||||
}
|
||||
|
||||
func output(resp response, asJson bool) string {
|
||||
if asJson {
|
||||
jsonStr, err := json.MarshalIndent(resp, "", "\t")
|
||||
if err != nil {
|
||||
log.Fatal("cannot encode the response as json")
|
||||
}
|
||||
return string(jsonStr)
|
||||
}
|
||||
|
||||
buf := new(bytes.Buffer)
|
||||
|
||||
t := template.Must(template.New("duplicated").Parse(templates.Duplicated))
|
||||
if err := t.Execute(buf, resp.Duplicated); err != nil {
|
||||
log.Fatal(errors.Wrap(err, "cannot parse clusterwide section of the output template"))
|
||||
}
|
||||
|
||||
t = template.Must(template.New("unused").Parse(templates.Unused))
|
||||
if err := t.Execute(buf, resp.Unused); err != nil {
|
||||
log.Fatal(errors.Wrap(err, "cannot parse clusterwide section of the output template"))
|
||||
}
|
||||
|
||||
return buf.String()
|
||||
}
|
||||
|
||||
func findUnused(ctx context.Context, client *mongo.Client, databases []string, collections []string) []indexes.IndexStat {
|
||||
unused := []indexes.IndexStat{}
|
||||
var err error
|
||||
|
||||
colls := make([]string, len(collections))
|
||||
copy(colls, collections)
|
||||
|
||||
for _, database := range databases {
|
||||
if len(collections) == 0 {
|
||||
colls, err = client.Database(database).ListCollectionNames(ctx, primitive.D{})
|
||||
if err != nil {
|
||||
log.Errorf("cannot get the list of collections for the database %s", database)
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
for _, collection := range colls {
|
||||
idx, err := indexes.FindUnused(ctx, client, database, collection)
|
||||
if err != nil {
|
||||
log.Errorf("error while checking unused indexes in %s.%s: %s", database, collection, err)
|
||||
continue
|
||||
}
|
||||
|
||||
unused = append(unused, idx...)
|
||||
}
|
||||
}
|
||||
|
||||
return unused
|
||||
}
|
||||
|
||||
func findDuplicated(ctx context.Context, client *mongo.Client, databases []string, collections []string) []indexes.Duplicate {
|
||||
duplicated := []indexes.Duplicate{}
|
||||
var err error
|
||||
|
||||
colls := make([]string, len(collections))
|
||||
copy(colls, collections)
|
||||
|
||||
for _, database := range databases {
|
||||
if len(collections) == 0 {
|
||||
colls, err = client.Database(database).ListCollectionNames(ctx, primitive.D{})
|
||||
if err != nil {
|
||||
log.Errorf("cannot get the list of collections for the database %s", database)
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
for _, collection := range colls {
|
||||
dups, err := indexes.FindDuplicated(ctx, client, database, collection)
|
||||
if err != nil {
|
||||
log.Errorf("error while checking duplicated indexes in %s.%s: %s", database, collection, err)
|
||||
continue
|
||||
}
|
||||
|
||||
duplicated = append(duplicated, dups...)
|
||||
}
|
||||
}
|
||||
|
||||
return duplicated
|
||||
}
|
10
src/go/pt-mongodb-index-check/templates/duplicated.go
Normal file
10
src/go/pt-mongodb-index-check/templates/duplicated.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package templates
|
||||
|
||||
// {{if $i}},{{end}} adds a comma after the first element.
|
||||
// When $i == 0 (first element) {{ if $i }} returns false (0)
|
||||
|
||||
var Duplicated = `
|
||||
Duplicated indexes
|
||||
{{ range . }}
|
||||
{{ .Namespace }}, index '{{ .Name }}', with fields { {{- range $i, $val := .Key }}{{if $i}}, {{end}}{{ $val.Key }}:{{ $val.Value }}{{ end -}} } is the prefix of '{{ .ContainerName }}' with fields { {{- range $i, $val := .ContainerKey }}{{if $i}}, {{end}}{{ $val.Key }}:{{ $val.Value }}{{ end -}} }{{ end}}
|
||||
`
|
10
src/go/pt-mongodb-index-check/templates/unused.go
Normal file
10
src/go/pt-mongodb-index-check/templates/unused.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package templates
|
||||
|
||||
// {{if $i}},{{end}} adds a comma after the first element.
|
||||
// When $i == 0 (first element) {{ if $i }} returns false (0)
|
||||
|
||||
var Unused = `
|
||||
Unused indexes since last restart
|
||||
{{ range . }}
|
||||
{{ .Spec.Namespace }}, index '{{ .Name }}' with fields { {{- range $i, $val := .Key }}{{if $i}}, {{end}}{{ $val.Key }}:{{ $val.Value }} }{{ end }}{{ end}}
|
||||
`
|
@@ -13,6 +13,11 @@ import (
|
||||
|
||||
"github.com/howeyc/gopass"
|
||||
"github.com/pborman/getopt"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
"go.mongodb.org/mongo-driver/mongo/options"
|
||||
|
||||
"github.com/percona/percona-toolkit/src/go/lib/config"
|
||||
"github.com/percona/percona-toolkit/src/go/lib/versioncheck"
|
||||
"github.com/percona/percona-toolkit/src/go/mongolib/fingerprinter"
|
||||
@@ -21,10 +26,6 @@ import (
|
||||
"github.com/percona/percona-toolkit/src/go/mongolib/stats"
|
||||
"github.com/percona/percona-toolkit/src/go/mongolib/util"
|
||||
"github.com/percona/percona-toolkit/src/go/pt-mongodb-query-digest/filter"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
"go.mongodb.org/mongo-driver/mongo/options"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -40,7 +41,7 @@ const (
|
||||
var (
|
||||
Build string = "2020-04-23" //nolint
|
||||
GoVersion string = "1.14.1" //nolint
|
||||
Version string = "3.3.2" //nolint
|
||||
Version string = "3.4.0" //nolint
|
||||
Commit string //nolint
|
||||
)
|
||||
|
||||
|
@@ -19,18 +19,19 @@ import (
|
||||
version "github.com/hashicorp/go-version"
|
||||
"github.com/howeyc/gopass"
|
||||
"github.com/pborman/getopt"
|
||||
"github.com/percona/percona-toolkit/src/go/lib/config"
|
||||
"github.com/percona/percona-toolkit/src/go/lib/versioncheck"
|
||||
"github.com/percona/percona-toolkit/src/go/mongolib/proto"
|
||||
"github.com/percona/percona-toolkit/src/go/mongolib/util"
|
||||
"github.com/percona/percona-toolkit/src/go/pt-mongodb-summary/oplog"
|
||||
"github.com/percona/percona-toolkit/src/go/pt-mongodb-summary/templates"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/shirou/gopsutil/process"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
"go.mongodb.org/mongo-driver/mongo/options"
|
||||
|
||||
"github.com/percona/percona-toolkit/src/go/lib/config"
|
||||
"github.com/percona/percona-toolkit/src/go/lib/versioncheck"
|
||||
"github.com/percona/percona-toolkit/src/go/mongolib/proto"
|
||||
"github.com/percona/percona-toolkit/src/go/mongolib/util"
|
||||
"github.com/percona/percona-toolkit/src/go/pt-mongodb-summary/oplog"
|
||||
"github.com/percona/percona-toolkit/src/go/pt-mongodb-summary/templates"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -56,7 +57,7 @@ const (
|
||||
var (
|
||||
Build string = "2020-04-23"
|
||||
GoVersion string = "1.14.1"
|
||||
Version string = "3.3.2"
|
||||
Version string = "3.4.0"
|
||||
Commit string
|
||||
|
||||
defaultConnectionTimeout = 3 * time.Second
|
||||
@@ -93,6 +94,7 @@ type hostInfo struct {
|
||||
ProcCreateTime time.Time
|
||||
ProcProcessCount int
|
||||
|
||||
CmdlineArgs []string
|
||||
// Server Status
|
||||
ProcessName string
|
||||
ReplicasetName string
|
||||
@@ -326,6 +328,11 @@ func formatResults(ci *collectedInfo, format string) ([]byte, error) {
|
||||
return nil, errors.Wrap(err, "cannot parse hosttemplateData section of the output template")
|
||||
}
|
||||
|
||||
t = template.Must(template.New("cmdlineargsa").Parse(templates.CmdlineArgs))
|
||||
if err := t.Execute(buf, ci.HostInfo); err != nil {
|
||||
return nil, errors.Wrap(err, "cannot parse the command line args section of the output template")
|
||||
}
|
||||
|
||||
t = template.Must(template.New("runningOps").Parse(templates.RunningOps))
|
||||
if err := t.Execute(buf, ci.RunningOps); err != nil {
|
||||
return nil, errors.Wrap(err, "cannot parse runningOps section of the output template")
|
||||
@@ -400,6 +407,7 @@ func getHostInfo(ctx context.Context, client *mongo.Client) (*hostInfo, error) {
|
||||
ProcPath: pi.Path,
|
||||
ProcUserName: pi.UserName,
|
||||
ProcCreateTime: pi.CreateTime,
|
||||
CmdlineArgs: cmdOpts.Argv,
|
||||
}
|
||||
if ss.Repl != nil {
|
||||
i.ReplicasetName = ss.Repl.SetName
|
||||
@@ -608,7 +616,8 @@ func getNodeType(ctx context.Context, client *mongo.Client) (string, error) {
|
||||
}
|
||||
|
||||
func getOpCountersStats(ctx context.Context, client *mongo.Client, count int,
|
||||
sleep time.Duration) (*opCounters, error) {
|
||||
sleep time.Duration,
|
||||
) (*opCounters, error) {
|
||||
oc := &opCounters{}
|
||||
prevOpCount := &opCounters{}
|
||||
ss := proto.ServerStatus{}
|
||||
|
@@ -8,6 +8,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/pborman/getopt"
|
||||
|
||||
tu "github.com/percona/percona-toolkit/src/go/internal/testutils"
|
||||
"github.com/percona/percona-toolkit/src/go/mongolib/proto"
|
||||
)
|
||||
|
@@ -6,12 +6,13 @@ import (
|
||||
"sort"
|
||||
"time"
|
||||
|
||||
"github.com/percona/percona-toolkit/src/go/mongolib/proto"
|
||||
"github.com/percona/percona-toolkit/src/go/mongolib/util"
|
||||
"github.com/pkg/errors"
|
||||
"go.mongodb.org/mongo-driver/bson"
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
"go.mongodb.org/mongo-driver/mongo/options"
|
||||
|
||||
"github.com/percona/percona-toolkit/src/go/mongolib/proto"
|
||||
"github.com/percona/percona-toolkit/src/go/mongolib/util"
|
||||
)
|
||||
|
||||
func GetOplogInfo(ctx context.Context, hostnames []string, co *options.ClientOptions) ([]proto.OplogInfo, error) {
|
||||
|
8
src/go/pt-mongodb-summary/templates/cmdline.go
Normal file
8
src/go/pt-mongodb-summary/templates/cmdline.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package templates
|
||||
|
||||
const CmdlineArgs = `
|
||||
{{ if . }}
|
||||
# Command line arguments
|
||||
{{ range .CmdlineArgs -}} {{- . }} {{ end }}
|
||||
{{- end }}
|
||||
`
|
@@ -19,7 +19,7 @@ const HostInfo = `# This host
|
||||
{{- end }}
|
||||
Processes | {{.ProcProcessCount}}
|
||||
Process Type | {{.NodeType}}
|
||||
{{ if .ReplicasetName -}}
|
||||
{{- if .ReplicasetName }}
|
||||
ReplSet | {{.ReplicasetName}}
|
||||
Repl Status |
|
||||
{{- end -}}
|
||||
|
@@ -8,20 +8,20 @@ import (
|
||||
"text/template"
|
||||
|
||||
"github.com/alecthomas/kingpin"
|
||||
_ "github.com/lib/pq"
|
||||
"github.com/pkg/errors"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/percona/percona-toolkit/src/go/lib/pginfo"
|
||||
"github.com/percona/percona-toolkit/src/go/pt-pg-summary/templates"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
_ "github.com/lib/pq"
|
||||
)
|
||||
|
||||
var (
|
||||
Build string = "2020-04-23" //nolint
|
||||
Commit string //nolint
|
||||
GoVersion string = "1.14.1" //nolint
|
||||
Version string = "3.3.1" //nolint
|
||||
Version string = "3.4.0" //nolint
|
||||
)
|
||||
|
||||
type connOpts struct {
|
||||
|
@@ -5,10 +5,10 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/percona/percona-toolkit/src/go/lib/pginfo"
|
||||
"github.com/percona/percona-toolkit/src/go/pt-pg-summary/internal/tu"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
type Test struct {
|
||||
|
@@ -16,10 +16,11 @@ import (
|
||||
"time"
|
||||
|
||||
shellwords "github.com/mattn/go-shellwords"
|
||||
"github.com/percona/percona-toolkit/src/go/pt-secure-collect/sanitize"
|
||||
"github.com/percona/percona-toolkit/src/go/pt-secure-collect/sanitize/util"
|
||||
"github.com/pkg/errors"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/percona/percona-toolkit/src/go/pt-secure-collect/sanitize"
|
||||
"github.com/percona/percona-toolkit/src/go/pt-secure-collect/sanitize/util"
|
||||
)
|
||||
|
||||
func collectData(opts *cliOptions) error {
|
||||
|
@@ -15,8 +15,8 @@ import (
|
||||
"github.com/alecthomas/kingpin"
|
||||
"github.com/go-ini/ini"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/sirupsen/logrus"
|
||||
"golang.org/x/crypto/ssh/terminal"
|
||||
)
|
||||
|
||||
@@ -86,7 +86,7 @@ var (
|
||||
|
||||
Build string = "2020-04-23" //nolint
|
||||
GoVersion string = "1.14.1" //nolint
|
||||
Version string = "3.3.1" //nolint
|
||||
Version string = "3.4.0" //nolint
|
||||
Commit string //nolint
|
||||
)
|
||||
|
||||
|
@@ -3,9 +3,10 @@ package main
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/percona/percona-toolkit/src/go/pt-secure-collect/sanitize"
|
||||
"github.com/percona/percona-toolkit/src/go/pt-secure-collect/sanitize/util"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
func sanitizeFile(opts *cliOptions) error {
|
||||
|
@@ -422,7 +422,258 @@ like(
|
||||
qr/matched=yes/,
|
||||
"Accepts floating point values as treshold variable"
|
||||
);
|
||||
|
||||
# ###########################################################################
|
||||
# Variable declaration for the retention tests
|
||||
# ###########################################################################
|
||||
|
||||
my $odate;
|
||||
|
||||
# ###########################################################################
|
||||
# Test if retention does not remove files that were not collected
|
||||
# ###########################################################################
|
||||
|
||||
cleanup();
|
||||
|
||||
system("mkdir $dest");
|
||||
$odate=`date --rfc-3339=date --date='-3 month'`;
|
||||
system("touch -d '$odate' $dest/nostalk");
|
||||
|
||||
$retval = system("$trunk/bin/pt-stalk --no-stalk --run-time 2 --dest $dest --prefix nostalk --pid $pid_file --iterations 1 -- --defaults-file=$cnf >$log_file 2>&1");
|
||||
$retval = system("$trunk/bin/pt-stalk --no-stalk --run-time 2 --dest $dest --pid $pid_file --iterations 1 -- --defaults-file=$cnf >$log_file 2>&1");
|
||||
|
||||
PerconaTest::wait_until(sub { !-f $pid_file });
|
||||
|
||||
$output = `ls -l $dest`;
|
||||
|
||||
like(
|
||||
$output,
|
||||
qr/nostalk/m,
|
||||
"Retention test 1: Not-matched file not touched"
|
||||
);
|
||||
|
||||
# ###########################################################################
|
||||
# Test if files that match the prefix-, are removed by the retention option
|
||||
# ###########################################################################
|
||||
|
||||
cleanup();
|
||||
|
||||
system("mkdir $dest");
|
||||
$odate=`date --rfc-3339=date --date='-3 month'`;
|
||||
system("touch -d '$odate' $dest/nostalk-");
|
||||
system("touch -d '$odate' $dest/nostalk-innodbstatus1");
|
||||
|
||||
$retval = system("$trunk/bin/pt-stalk --no-stalk --run-time 2 --dest $dest --prefix nostalk --pid $pid_file --iterations 1 -- --defaults-file=$cnf >$log_file 2>&1");
|
||||
|
||||
PerconaTest::wait_until(sub { !-f $pid_file });
|
||||
|
||||
$output = `ls -l $dest`;
|
||||
|
||||
unlike(
|
||||
$output,
|
||||
qr/^nostalk-$/m,
|
||||
"Retention test 2: tests, matched prefix-, are removed"
|
||||
);
|
||||
|
||||
unlike(
|
||||
$output,
|
||||
qr/^nostalk-innodbstatus1$/m,
|
||||
"Retention test 2: tests, matched prefix-innodbstatus1, are removed"
|
||||
);
|
||||
|
||||
# ###########################################################################
|
||||
# Test if retention removes old files that match auto-generated pattern
|
||||
# ###########################################################################
|
||||
|
||||
cleanup();
|
||||
|
||||
system("mkdir $dest");
|
||||
$odate=`date --rfc-3339=date --date='-3 month'`;
|
||||
|
||||
$retval = system("$trunk/bin/pt-stalk --no-stalk --run-time 2 --dest $dest --pid $pid_file --iterations 1 -- --defaults-file=$cnf >$log_file 2>&1");
|
||||
|
||||
PerconaTest::wait_until(sub { !-f $pid_file });
|
||||
|
||||
$output = `ls -l $dest | wc -l`;
|
||||
|
||||
system("touch -d '$odate' $dest/*");
|
||||
$retval = system("$trunk/bin/pt-stalk --no-stalk --run-time 2 --dest $dest --pid $pid_file --iterations 1 -- --defaults-file=$cnf >$log_file 2>&1");
|
||||
|
||||
PerconaTest::wait_until(sub { !-f $pid_file });
|
||||
|
||||
$output = `ls -l $dest | wc -l` - $output;
|
||||
|
||||
is(
|
||||
$output,
|
||||
0,
|
||||
"Retention test 3: tests, matched auto-generated patern, are removed"
|
||||
);
|
||||
|
||||
# ###########################################################################
|
||||
# Test if retention by size works as expected
|
||||
# ###########################################################################
|
||||
|
||||
cleanup();
|
||||
|
||||
$retval = system("$trunk/bin/pt-stalk --no-stalk --run-time 2 --sleep 2 --dest $dest --pid $pid_file --iterations 5 -- --defaults-file=$cnf >$log_file 2>&1");
|
||||
|
||||
$output = `du -s $dest | cut -f 1`;
|
||||
|
||||
PerconaTest::wait_until(sub { !-f $pid_file });
|
||||
|
||||
$retval = system("$trunk/bin/pt-stalk --no-stalk --run-time 2 --dest $dest --retention-size 1 --pid $pid_file --iterations 1 -- --defaults-file=$cnf >$log_file 2>&1");
|
||||
|
||||
PerconaTest::wait_until(sub { !-f $pid_file });
|
||||
|
||||
$output = $output / `du -s $dest | cut -f 1`;
|
||||
|
||||
ok(
|
||||
$output >= 5,
|
||||
"Retention test 4: retention by size works as expected"
|
||||
);
|
||||
|
||||
# ###########################################################################
|
||||
# Test if retention by count works as expected
|
||||
# ###########################################################################
|
||||
|
||||
cleanup();
|
||||
|
||||
$retval = system("$trunk/bin/pt-stalk --no-stalk --run-time 2 --sleep 2 --dest $dest --pid $pid_file --iterations 1 -- --defaults-file=$cnf >$log_file 2>&1");
|
||||
|
||||
PerconaTest::wait_until(sub { !-f $pid_file });
|
||||
|
||||
$output = `ls -l $dest | wc -l`;
|
||||
|
||||
$retval = system("$trunk/bin/pt-stalk --no-stalk --run-time 2 --dest $dest --retention-count 1 --pid $pid_file --iterations 1 -- --defaults-file=$cnf >$log_file 2>&1");
|
||||
|
||||
PerconaTest::wait_until(sub { !-f $pid_file });
|
||||
|
||||
$output = $output - `ls -l $dest | wc -l`;
|
||||
|
||||
is(
|
||||
$output,
|
||||
0,
|
||||
"Retention test 5: retention by count works as expected"
|
||||
);
|
||||
|
||||
# ###########################################################################
|
||||
# Test if option --system-only works correctly
|
||||
# ###########################################################################
|
||||
|
||||
cleanup();
|
||||
|
||||
$retval = system("$trunk/bin/pt-stalk --no-stalk --system-only --run-time 10 --sleep 2 --dest $dest --pid $pid_file --iterations 1 -- --defaults-file=$cnf >$log_file 2>&1");
|
||||
|
||||
PerconaTest::wait_until(sub { !-f $pid_file });
|
||||
|
||||
$output = `ls $dest`;
|
||||
|
||||
like(
|
||||
$output,
|
||||
qr/(df)|(meminfo)/,
|
||||
"Option --system-only collects system data"
|
||||
);
|
||||
|
||||
unlike(
|
||||
$output,
|
||||
qr/(innodbstatus)|(mysqladmin)/,
|
||||
"Option --system-only does not collect MySQL data"
|
||||
);
|
||||
|
||||
# ###########################################################################
|
||||
# Test if option --mysql-only works correctly
|
||||
# ###########################################################################
|
||||
|
||||
cleanup();
|
||||
|
||||
$retval = system("$trunk/bin/pt-stalk --no-stalk --mysql-only --run-time 10 --sleep 2 --dest $dest --pid $pid_file --iterations 1 -- --defaults-file=$cnf >$log_file 2>&1");
|
||||
|
||||
PerconaTest::wait_until(sub { !-f $pid_file });
|
||||
|
||||
$output = `ls $dest`;
|
||||
|
||||
unlike(
|
||||
$output,
|
||||
qr/(df)|(meminfo)/,
|
||||
"Option --mysql-only does not collect system data"
|
||||
);
|
||||
|
||||
like(
|
||||
$output,
|
||||
qr/(innodbstatus)|(mysqladmin)/,
|
||||
"Option --mysql-only collects MySQL data"
|
||||
);
|
||||
|
||||
# ###########################################################################
|
||||
# Test if options --mysql-only and --system-only specified together,
|
||||
# pt-stalk collects only disk-space, hostname, output, and trigger
|
||||
# ###########################################################################
|
||||
|
||||
cleanup();
|
||||
|
||||
$retval = system("$trunk/bin/pt-stalk --no-stalk --mysql-only --system-only --run-time 10 --sleep 2 --dest $dest --pid $pid_file --iterations 1 --prefix test -- --defaults-file=$cnf >$log_file 2>&1");
|
||||
|
||||
PerconaTest::wait_until(sub { !-f $pid_file });
|
||||
|
||||
$output = `ls $dest`;
|
||||
|
||||
is(
|
||||
$output,
|
||||
"test-disk-space\ntest-hostname\ntest-output\ntest-trigger\n",
|
||||
"If both options --mysql-only and --system-only are specified only essential collections are triggered"
|
||||
);
|
||||
|
||||
|
||||
# ###########################################################################
|
||||
# Test if open tables are collected if number of open tables <= 1000
|
||||
# ###########################################################################
|
||||
|
||||
cleanup();
|
||||
|
||||
$dbh->do('FLUSH TABLES');
|
||||
|
||||
$retval = system("$trunk/bin/pt-stalk --no-stalk --run-time 10 --sleep 2 --dest $dest --pid $pid_file --iterations 1 --prefix test -- --defaults-file=$cnf >$log_file 2>&1");
|
||||
|
||||
PerconaTest::wait_until(sub { !-f $pid_file });
|
||||
|
||||
$output = `head -n 1 $dest/test-opentables1`;
|
||||
|
||||
is(
|
||||
$output,
|
||||
"Database\tTable\tIn_use\tName_locked\n",
|
||||
"If number of open tables is less or equal than 1000, the output of 'SHOW OPEN TABLES' is collected"
|
||||
);
|
||||
|
||||
# ###########################################################################
|
||||
# Test if open tables are not collected if number of open tables > 1000
|
||||
# ###########################################################################
|
||||
|
||||
cleanup();
|
||||
|
||||
$retval = $dbh->do('FLUSH TABLES');
|
||||
$retval = $dbh->do('CREATE DATABASE IF NOT EXISTS test_open_tables');
|
||||
|
||||
$retval = $dbh->do('SET @old_table_open_cache=@@global.table_open_cache, GLOBAL table_open_cache=1001*@@global.table_open_cache_instances');
|
||||
|
||||
for (my $i = 0; $i < 1002; $i++) {
|
||||
$retval = $dbh->do("CREATE TABLE IF NOT EXISTS test_open_tables.t_$i(id int)");
|
||||
$retval = $dbh->do("INSERT INTO test_open_tables.t_$i VALUES($i)");
|
||||
}
|
||||
|
||||
$retval = system("$trunk/bin/pt-stalk --no-stalk --run-time=10 --dest $dest --pid $pid_file --iterations 1 --prefix test -- --defaults-file=$cnf >$log_file 2>&1");
|
||||
|
||||
PerconaTest::wait_until(sub { !-f $pid_file });
|
||||
|
||||
$output = `cat $dest/test-opentables1`;
|
||||
|
||||
like(
|
||||
$output,
|
||||
qr/Logging disabled due to having over 1000 tables open. Number of tables currently open/,
|
||||
"If number of open tables is greater than 1000, the output of 'SHOW OPEN TABLES' is not collected"
|
||||
);
|
||||
|
||||
$retval = $dbh->do('SET GLOBAL table_open_cache=@old_table_open_cache');
|
||||
$retval = $dbh->do('DROP DATABASE test_open_tables');
|
||||
# ###########################################################################
|
||||
# Test report about performance schema transactions in MySQL 5.7+
|
||||
# ###########################################################################
|
||||
@@ -575,6 +826,7 @@ SKIP: {
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
# #############################################################################
|
||||
# Done.
|
||||
# #############################################################################
|
||||
|
@@ -43,7 +43,7 @@ else {
|
||||
|
||||
my $output;
|
||||
my $cnf = '/tmp/12345/my.sandbox.cnf';
|
||||
my @args = ('-F', $cnf, 'h=127.1,P=12345', 'P=2900', qw(-d bidi --bidirectional));
|
||||
my @args = ('-F', $cnf, 'h=127.1,P=12345', 'P=2900', qw(-d bidi --bidirectional --no-version-check));
|
||||
|
||||
$sb->wipe_clean($c1_dbh);
|
||||
$sb->wipe_clean($r1_dbh);
|
||||
|
@@ -24,7 +24,8 @@ if ( !$master_dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox master';
|
||||
}
|
||||
else {
|
||||
plan tests => 2;
|
||||
plan skip_all => 'This test is freezing';
|
||||
#plan tests => 2;
|
||||
}
|
||||
|
||||
$sb->wipe_clean($master_dbh);
|
84
t/pt-table-sync/pt-2016.t
Normal file
84
t/pt-table-sync/pt-2016.t
Normal file
@@ -0,0 +1,84 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
BEGIN {
|
||||
die "The PERCONA_TOOLKIT_BRANCH environment variable is not set.\n"
|
||||
unless $ENV{PERCONA_TOOLKIT_BRANCH} && -d $ENV{PERCONA_TOOLKIT_BRANCH};
|
||||
unshift @INC, "$ENV{PERCONA_TOOLKIT_BRANCH}/lib";
|
||||
};
|
||||
|
||||
binmode(STDIN, ':utf8') or die "Can't binmode(STDIN, ':utf8'): $OS_ERROR";
|
||||
binmode(STDOUT, ':utf8') or die "Can't binmode(STDOUT, ':utf8'): $OS_ERROR";
|
||||
|
||||
use strict;
|
||||
use utf8;
|
||||
use Encode qw(decode encode);
|
||||
use warnings FATAL => 'all';
|
||||
use English qw(-no_match_vars);
|
||||
use Test::More;
|
||||
|
||||
use PerconaTest;
|
||||
use Sandbox;
|
||||
require "$trunk/bin/pt-table-sync";
|
||||
|
||||
my $dp = new DSNParser(opts=>$dsn_opts);
|
||||
my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp);
|
||||
my $master_dbh = $sb->get_dbh_for('master');
|
||||
my $slave1_dbh = $sb->get_dbh_for('slave1');
|
||||
my $slave2_dbh = $sb->get_dbh_for('slave2');
|
||||
|
||||
if ( !$master_dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox master';
|
||||
}
|
||||
elsif ( !$slave1_dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox slave1';
|
||||
}
|
||||
elsif ( !$slave1_dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox slave2';
|
||||
}
|
||||
else {
|
||||
plan tests => 3;
|
||||
}
|
||||
|
||||
|
||||
my ($output, $status);
|
||||
my @args = ('h=127.0.0.1,P=12346,u=msandbox,p=msandbox,D=test,t=test2', '--sync-to-master',
|
||||
'--chunk-size=1', '--hex-blob', '--execute');
|
||||
|
||||
# use lib/samples dir since the main change is in DSNParser
|
||||
$sb->load_file('master', "t/pt-table-sync/samples/pt-2016.sql");
|
||||
|
||||
$sb->wait_for_slaves();
|
||||
|
||||
$slave1_dbh->do("UPDATE test.test2 SET col3='bbb'");
|
||||
$slave1_dbh->do("FLUSH TABLES");
|
||||
|
||||
# 1
|
||||
($output, $status) = full_output(
|
||||
sub { pt_table_sync::main(@args) },
|
||||
);
|
||||
|
||||
is(
|
||||
$status,
|
||||
2, # exit_status = 2 -> there were differences
|
||||
"PT-2016 table-sync CRC32 in key - Exit status",
|
||||
);
|
||||
|
||||
# 2
|
||||
my $want = {
|
||||
col1 => 1,
|
||||
col2 => 'aaa',
|
||||
col3 => 'aaa'
|
||||
};
|
||||
my $row = $slave1_dbh->selectrow_hashref("SELECT col1, col2, col3 FROM test.test2");
|
||||
is_deeply(
|
||||
$row,
|
||||
$want,
|
||||
"PT-2016 table-sync CRC32 in key - Master was updated",
|
||||
) or diag("Want '".($want||"")."', got '".($row->{col3}||"")."'");
|
||||
|
||||
# #############################################################################
|
||||
# Done.
|
||||
# #############################################################################
|
||||
$sb->wipe_clean($master_dbh);
|
||||
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");
|
||||
exit;
|
12
t/pt-table-sync/samples/pt-2016.sql
Normal file
12
t/pt-table-sync/samples/pt-2016.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
DROP DATABASE IF EXISTS test;
|
||||
|
||||
CREATE DATABASE test;
|
||||
|
||||
CREATE TABLE test.test2 (
|
||||
col1 INT NOT NULL,
|
||||
col2 TEXT NOT NULL,
|
||||
col3 VARCHAR(5) NOT NULL,
|
||||
UNIQUE KEY (col1, col2(3))
|
||||
);
|
||||
|
||||
INSERT INTO test.test2 VALUES(1,'aaa','aaa');
|
@@ -72,19 +72,19 @@ replace_pkg_in_tool() {
|
||||
if [ "$tool_lang" = "perl" ]; then
|
||||
echo "# $pkg package
|
||||
# This package is a copy without comments from the original. The original
|
||||
# with comments and its test file can be found in the Bazaar repository at,
|
||||
# with comments and its test file can be found in the GitHub repository at,
|
||||
# lib/$pkg_file_base.pm
|
||||
# t/lib/$pkg_file_base.t
|
||||
# See https://launchpad.net/percona-toolkit for more information.
|
||||
# See https://github.com/percona/percona-toolkit for more information.
|
||||
# ###########################################################################
|
||||
{" >> $tmp_file
|
||||
else
|
||||
echo "# $pkg package
|
||||
# This package is a copy without comments from the original. The original
|
||||
# with comments and its test file can be found in the Bazaar repository at,
|
||||
# with comments and its test file can be found in the GitHub repository at,
|
||||
# lib/bash/$pkg.sh
|
||||
# t/lib/bash/$pkg.sh
|
||||
# See https://launchpad.net/percona-toolkit for more information.
|
||||
# See https://github.com/percona/percona-toolkit for more information.
|
||||
# ###########################################################################
|
||||
" >> $tmp_file
|
||||
fi
|
||||
|
Reference in New Issue
Block a user