Unlimited chunk size (--chunk-size-limit=0) inhibits checksumming of single-nibble tables

Bug #1441928 reported by markus_albe on 2015-04-09
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Fix Released
Frank Cizmich

Bug Description

Unlimited chunk size (--chunk-size-limit=0) inhibits checksumming of single-nibble tables

pt-online-schema-change 2.2.13 @ line 9068:

PTDEBUG && _d('Table on',$slave->name(),'has', $n_rows, 'rows');
if ( $n_rows && $n_rows > ($tbl->{chunk_size} * $limit) ) {
    PTDEBUG && _d('Table too large on', $slave->name());
    push @too_large, [$slave->name(), $n_rows || 0];

Where $n_rows is the estimate number of rows in the slave's table, and the $limit is the --chunk-size-limit. So it's multiplying by zero, and this shows the slave's table as always larger.

How to repeat: examine code and documentation (http://www.percona.com/doc/percona-toolkit/2.1/pt-online-schema-change.html#cmdoption-pt-online-schema-change--chunk-size-limit states "You can disable oversized chunk checking by specifying a value of 0." but doesn't warns about this corner case)

How to fix: ignore -for this check- --chunk-size-limit if equals zero.

tags: added: 52768
removed: 52758

Confirmed by code review.

Changed in percona-toolkit:
status: New → Confirmed
tags: added: i52768
removed: 52768
Frank Cizmich (frank-cizmich) wrote :

Fixed, as suggested.

Changed in percona-toolkit:
status: Confirmed → Fix Committed
importance: Undecided → Medium
assignee: nobody → Frank Cizmich (frank-cizmich)
milestone: none → 2.2.15
Changed in percona-toolkit:
status: Fix Committed → Fix Released

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-678

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers