Incorrect posix_fadvise in stream_one_file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona XtraBackup moved to https://jira.percona.com/projects/PXB |
Triaged
|
Medium
|
Unassigned | ||
2.0 |
Triaged
|
Medium
|
Unassigned | ||
2.1 |
Triaged
|
Medium
|
Unassigned | ||
2.2 |
Triaged
|
Medium
|
Unassigned |
Bug Description
Earlier reported in lp:1095249
a)
stream_
{
uchar buf[XBSTREAM_
size_t bytes;
posix_
while ((bytes = my_read(file, buf, XBSTREAM_
MYF(MY_WME))) > 0) {
if (xb_stream_
msg("%s: xb_stream_
return 1;
}
posix_
}
......
.....
here, it is doing fadvise POSIX_FADV_SEQ which doubles the
readahead but in the loop it discards it everytime. It should
either do POSIX_FADV_DONTNEED at the end (outside the loop) or
use ranges with POSIX_FADV_DONTNEED in the loop.
b) There are many other places where it is used which will need to be checked (since with O_DIRECT used all of the posix_fadvise serve no purpose)
See also bug #1067485.