I have read
pt-online-schema-change documentation and understood that it works by creating triggers and copying data in chunks with in chunk-time seconds(0.5 seconds in default)
Let us consider this below case.
We have a table TBL1 of 5 GB and is being altered with PT-ONLINE-SCHEMA-CHANGE
PT-ONLINE-SCHEMA-CHANGE created new table with the desired change, added trigggers on TBL1 and started copying.
copied 10 chunks of data and started copying 11th chunk which is some 'X' MB in size. As per tool, this chunk be copied in a max of 500 milliseconds or 0.5 seconds
During the 11th chunk copying, application issued an UPDATE which has to modify effect rows that are part of this 11th chunk of data.
My question is that which of the below things happen now.original table now ?
A) Update will be blocked till the chunk be copied and then applied on original table
which gets updated through triggers on new one.
B) Update will be performed on original table and data chunk will be re copied all
If Option A is the answer, how PT-ONLINE-SCHEMA-CHANGE can be lock free ?
If Option B is the answer, how it knows the chunk being copied is modified ?
Thanks in advance.