-
Martin Blix Grydeland authored
When vsl_reclen (maximum length of a record) is close to vsl_buffer, the vsl buffer is flushed to the main shared memory log for every record. This is because we test if there is space for vsl_reclen, not the actual size of the formatted log record (which likely is much smaller). Fix this by doing the formatting in up to two stages. If the first stage shows that we overflowed, but would not have overflown vcl_reclen if there was more room in the buffer, then flush and redo the formatting. This limits the extra work of formatting twice only to the one record that happened to overflow the buffer.
5810817d