Le 3/19/12 6:27 PM, Selcuk AYA a écrit :
On Mon, Mar 19, 2012 at 10:26 AM, Selcuk AYA<ayasel...@gmail.com>  wrote:
On Mon, Mar 19, 2012 at 9:24 AM, Emmanuel Lécharny<elecha...@gmail.com>  wrote:
Hi,

I have a few questions about the handling of the log buffer.

When we can't write anymore data in the buffer, because it's full, we try to
flush the buffer on disk. What happens then is :
- if there is enough room remaining in the buffer, we write a skip record
(with a -1 length) : is it necessary ? (we then rewind the buffer)
- otherwise, we rewind the buffer

In any case, we increment the writeAheadRewindCount : what for ?
as far as I can remember, writeAheadRewindCount was to avoid
overwriting non flushed log records when in memory circular buffer
wraps. IF this answer is not good enough, I can take a look more
closely later.
Give me a bit of time to check the code again if you don't remember the exact usage. I was wondering if it was more or less a protection against a second flush thread being executed (for instance by an explicit call) while a flush is called when the buffer is full.

AFAICT, the flush thread check the LSN to know when to stop flushing records.
Not sure though.

--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com

Reply via email to