FASTER
FASTER copied to clipboard
FasterLog.CommitAsync will missing iterator offset if iterator does not call CompleteUntil before
using var iter = log.Scan(0, long.MaxValue, "foo", recover: true);
while (iter.GetNext(out var result, out var length, out var currentAddress, out nextAddress))
{
// THIS WAITASYNC BELOW HANGS
if (await iter.WaitAsync())
{
Console.WriteLine("read data currentAddress:{0}, nextAddress :{1}, content:{2}", currentAddress, nextAddress, Encoding.UTF8.GetString(result));
//iter.CompleteUntil(nextAddress)
await iter.CompleteUntilRecordAtAsync(currentAddress);
}
}
await log.CommitAsync();
If not call iter.CompleteUntil or iter.CompleteUntilRecordAtAsync , the iterator offset will missing when after next restart.
How can i ensure CompleteUntilRecordAtAsync/CompleteUntil has called?
thats true I have similar