fix for regression in r1335. nextUnstableLSN needs to point to the beginning of a valid log entry. Add sizeof(lsn_t) to its computation so that we point at the beginning of the next entry, not to its size

This commit is contained in:
Sears Russell 2010-01-21 22:30:02 +00:00
parent 17ac09c652
commit 434cec1b6a

View file

@ -420,7 +420,7 @@ static void syncLog_LogWriter(stasis_log_t * log,
stasis_log_safe_writes_state* sw = log->impl;
lsn_t newFlushedLSN;
newFlushedLSN = log_crc_entry(log) + sizeofInternalLogEntry_LogWriter(log, 0);
newFlushedLSN = log_crc_entry(log) + sizeof(lsn_t) + sizeofInternalLogEntry_LogWriter(log, 0);
fflush(sw->fp);