8.33. The tungsten_skip_seqno Script

The tungsten_skip_seqno allows events to be skipped based on filters, allowing the Tungsten Replicator to come back online with less manual intervention.

tungsten_skip_seqno [ --auto  ] [ --debug, -d  ] [ --filter, -f  ] [ --filters  ] [ --help, -h  ] [ --info, -i  ] [ --max, -m  ] [ --path, -p  ] [ --quiet, -q  ] [ --service, -s  ] [ --tpm  ] [ --trepctl  ] [ --verbose, -v  ]

Where:

Table 8.49. tungsten_skip_seqno Command-line Options

OptionDescription
--autoAutomatically skip when seqno is an error state - ONLY USE THIS WHEN ASKED TO BY CONTINUENT SUPPORT
--debug, -dImplies -v and -i also. Debug mode is VERY chatty, avoid it unless you really need it.
--filter, -fSpecify a single regex to match in the pendingExceptionMessage. If a filter is specified, then the new behavior will be to skip if the regex matches the pendingExceptionMessage, and do not not skip if there is no match. The regex will be matched against the pendingExceptionMessage like this: /yourRegexValue/gm Example, to match foreign key errors in a specific table: foreign key constraint fails.*?`yourSchemaName`.`yourTableName`
--filtersSpecify a plain text file with one or more regexes, one per line, to match in the pendingExceptionMessage.
--help, -h
--info, -iDisplay additional information, but not fully verbose
--max, -mSpecify the maximum number of iterations
--path, -pSpecify the path to the trepctl executable if not installed in default location.
--quiet, -q
--service, -sSpecify the {service_name} to act against if more than one service running
--tpmSpecify tpm executable name and path if changed from default.
--trepctlSpecify trepctl executable name and path if changed from default.
--verbose, -vDisplay additional information (implies --info)

General Operation

By default, the tungsten_skip_seqno command will:

  • Gather a list of replicator service names using trepctl services | grep serviceName

  • Start an inifinite loop

  • Loop thru all services or use the service specified on the cli using the --service option

  • Check the service status via trepctl -service {serviceName_here} status -json

  • If the pendingErrorSeqno is not -1, then process the error state

  • By default, if there is an error condition, a detailed message is displayed, and the user may skip the seqno interactively

  • if the tungsten_skip_seqno command is called with --auto then the seqno with the error will be skipped automatically

  • if the maximum number of loops has been reached (default: 100), the script will exit. Use --max to adjust this value

  • Sleep for 3 seconds by default, then iterate