Subject: ulog_map doesn't work with very large ulogentries values
Ticket #7368 removed the maximum value of ulogentries (formerly 2500),
but did not add checking of make enough changes to avoid problems with
very large values of ulogentries:
* If ulogentries is 128K or more, then ulog_map won't map the full ulog,
since it always maps MAXLOGLEN bytes (256MB) without regard to the file
size. In this case the code will eventually experience a segmentation
* resize_ulog computes the new file size (headersize + newblocksize *
ulogentries) and errors if that exceeds MAXLOGLEN bytes. So if
ulogentries is something like 100K, then the ulog will until the record
size needs to be expanded, and will then fail.
The best fix is to get rid of MAXLOGLEN, map the file size in ulog_map,
and remap the file in resize(). Failing that, a check in ulog_map()
would make the current approach safer.
Download (untitled) 845b