Skipping chunks when using pt-online-schema-change

Description

Some of the documentation for pt-online-schema-change discusses skipping chunks but skipping any chunks would cause data loss.

Environment

None

is duplicated by

Smart Checklist

Activity

Show:

Sveta Smirnova January 30, 2023 at 1:11 PM

Lalit Choudhary October 23, 2018 at 1:45 PM

Hi Monty,

Thank you for the report.

    

pt-online-schema-change documentation has good example about why there is chunk-size-limit but it should also include the information about what will happen if --chunk-size-limit exceed.

In such case pt-online-schema-change  will exit with an error code, the data will remain untouched.

 

https://github.com/percona/percona-toolkit/blob/3.0/bin/pt-online-schema-change#L10360-L10377

die ts("Error copying rows at chunk " . $nibble_iter->nibble_number() . " of $tbl->{db}.$tbl->{tbl} because it is oversized. "

 

 

 

 

monty monty July 18, 2018 at 5:36 PM

Some excerpts from the documentation

--[no]check-plan

If it appears that MySQL will use a bad query execution plan, the tool will skip the chunk of the table.

The tool remembers the largest key_len seen, and skips chunks where MySQL reports that it will use a smaller prefix of the index.

The tool prints a warning the first time a chunk is skipped due to a bad execution plan in each table. Subsequent chunks are skipped silently, although you can see the count of skipped chunks in the SKIPPED column in the tool’s output.

--chunk-size

Such a chunk will probably be skipped because of --chunk-size-limit.

--chunk-size-limit

If that estimate exceeds the desired chunk size times the limit, then the tool skips the chunk.

Done

Details

Assignee

Reporter

Priority

Affects versions

Fix versions

Story Points

Smart Checklist

Created July 18, 2018 at 5:36 PM
Updated March 4, 2024 at 4:31 PM
Resolved April 17, 2023 at 2:36 PM