Documentation bug on pt-osc --check-plan?
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
In the documentation https:/
Here are the blurbs from the doc:
" 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. This heuristic can be understood as skipping chunks that have a worse execution plan than other chunks."
"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."
From a quick look into the code, it looks like every time check-plan fails, it calls "die()" to terminate the job. I would like to double check that "skip chunk" is just a documentation bug.
tags: | added: pt-online-schema-change |
Hi Frank,
As per the code, it seems, that it calls die. Should we need to verify with specific test case?
else { # chunking the table 'check- plan') ) { >index_ length(
Cxn => $args{Cxn},
tbl => $tbl,
index => $nibble_ iter->nibble_ index() ,
n_index_ cols => $o->get( 'chunk- index-columns' ), iter->nibble_ index() ) ) {
die ts("Cannot determine the key_len of the chunk index "
. "because MySQL chose "
. ($key ? "the $key" : "no") . " index "
. "instead of the " . $nibble_ iter->nibble_ index()
. " index for the first lower boundary statement. "
. "See --[no]check-plan in the documentation for more "
. "information.");
die ts("The key_len of the $key index is "
. (defined $key_len ? "zero" : "NULL")
. ", but this should not be possible. "
. "See --[no]check-plan in the documentation for more "
. "information.");
$tbl->{ key_len} = $key_len;
if ( $o->get(
my $idx_len = new IndexLength(Quoter => $q);
my ($key_len, $key) = $idx_len-
);
if ( !$key || lc($key) ne lc($nibble_
}
elsif ( !$key_len ) {
}
}
}