Code review comment for lp:~ihanick/percona-server/5.1-innodb-log_archiving

Revision history for this message
Alexey Kopytov (akopytov) wrote :

Nickolay,

I didn't have time to review everything, but the following code in os_file_rename_throttled() caught my eye:

> + success = os_file_get_size(file, &size_low, &size_high);
> + ut_a(success);
> +
> + for (offset_high = 0; offset_high<size_high; ++offset_high) {
> + for (offset = 0; offset<size_low/block_size; ++offset) {

I see the following problems with it:

1. when size_high == 0 (i.e. the file size is < 4 GB), we will have 0 loop iterations, i.e. we won't copy anything.

2. when size_high = 2 and size_low = 1024*1024 (i.e. the file size is 8 GB + 1 MB), we will have 2 iterations, each copying 1 MB, so we'll copy 2 MB in total.

review: Needs Fixing

« Back to merge proposal