-
|
Beta Was this translation helpful? Give feedback.
Answered by
badrishc
Dec 13, 2021
Replies: 2 comments 1 reply
-
I assume you are talking about var PageSize = 1L << logSettings.PageSizeBits;
var committedUntilAddress = log.CommittedUntilAddress;
var committedPageStart = committedUntilAddress & ~(PageSize - 1);
if (committedPageStart == committedUntilAddress) // corner case: committed until page boundary
committedPageStart -= PageSize;
using (var iter = log.Scan(committedPageStart, committedUntilAddress))
{
// skip to the last record of this scan
}
Every enqueue is associated with an offset. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
AntyaDev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I assume you are talking about
FasterLog
and want to get the last committed value.FasterLog
is committed untillog.CommitedUntilAddress
. One option is to scan that last committed page and find the last committed record.