The tungsten_find_position Command
The tungsten_find_position assists with locating event information in the THL and producing a dsctl set command
as output.
Usage
tungsten_find_position [option]
Where:
| Option | Description | Product |
|---|---|---|
--debugAliases: -d | Enable additional debug output. Debug mode is VERY chatty, avoid it unless you really need it. Default: false | CTTR |
--fileAliases: -f | Pass the -file argument to the thl list command to make the location operation more efficient - the script will not have to parse ALL of the available THL.Default: false | CTTR |
--fromAliases: --low | Pass specified seqno to the thl command to signify the starting position to scan from. Will continue to scan to the end of all available thl unless the --to|--high options are provided. | CTTR |
--helpAliases: -h | Show help text. | CTTR |
--pathAliases: -p | Specify the full path to the executable directory where the thl and trepctl commands are located. | CTTR |
--quietAliases: -q | Normally, this command will output helpful text at the end of the run. Using this option will prevent that from happening. | CTTR |
--serviceAliases: -s | Specify the service name to use with the various commands. | CTTR |
--testAliases: -t | Test mode - do not perform the actual update on the files. Default: falase | CTTR |
--thl | Specify the full path to the thl command executable file. Often used where there are multiple Tungsten installations, i.e.Multi-Site/Active-Active where there are both Cluster and Replicator binaries. | CTTR |
--toAliases: --high | Pass specified seqno to the thl command to signify the ending position to scan to. Will scan from the start of all available thl unless the --from|--low options are provided. | CTTR |
--trepctl | Specify the full path to the trepctl command executable file. Often used where there are multiple Tungsten installations, i.e.Multi-Site/Active-Active where there are both Cluster and Replicator binaries. | CTTR |
--verboseAliases: -v | Show verbose output Default: false | CTTR |
The tungsten_find_position command performs the following steps:
- Get the MySQL binary log position to search for from the CLI and validate
- Validate paths and commands
- Load all available service names and validate any specified service against that list
- Check if this Replicator is in the primary role
- Locate the supplied binary log position in the available THL
- Parse the THL found, if any
- Generate the
dsctlcommand and display
Below is a sample session:
shell> tungsten_find_position mysql-bin.000030:0000000000001981
dsctl set -reset -seqno 4 -epoch 2 -event-id "mysql-bin.000030:0000000000001981;-1" -source-id "db1"