You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FasterLogScanIterator.CompleteUntil() updates requestedCompletedUntilAddress. However, FasterLogRecoveryInfo.SnapshotIterators() looks at CompletedUntilAddress, not requestedCompletedUntilAddress, so the value never makes its way to persistence. Repro below:
byte[] testBytes1 = new byte[] { 0, 1, 2, 3, 4, 5, 6, 7 };
byte[] testBytes2 = new byte[] { 8, 9, 10, 11, 12, 13, 14, 15 };
const string iterName = "snowflake";
var settings = new FasterLogSettings
{
LogDevice = Devices.CreateLogDevice(Environment.CurrentDirectory + "/abc.lf"),
LogCommitFile = Environment.CurrentDirectory + "/abc.cf"
};
using (var log = new FasterLog(settings))
using (var iter = log.Scan(0, long.MaxValue, iterName))
{
byte[] readBuf = new byte[128];
log.Enqueue(testBytes1);
log.Enqueue(testBytes2);
log.Commit();
iter.GetNext(out readBuf, out int len, out long addr);
iter.CompleteUntil(addr);
log.Commit();
}
using (var recoveredLog = new FasterLog(settings))
using (var iter = recoveredLog.Scan(0, long.MaxValue, iterName))
{
byte[] readBuf = new byte[128];
iter.GetNext(out readBuf, out int len, out long addr);
/* you would expect readBuf to have {8, 9, 10...} but it has {0, 1, 2...} */
}
The text was updated successfully, but these errors were encountered:
mito-csod
changed the title
FasterLog.Commit() doesn't save progress of persisted iterators
[C#] FasterLog.Commit() doesn't save progress of persisted iterators
Dec 23, 2019
FasterLogScanIterator.CompleteUntil() updates requestedCompletedUntilAddress. However, FasterLogRecoveryInfo.SnapshotIterators() looks at CompletedUntilAddress, not requestedCompletedUntilAddress, so the value never makes its way to persistence. Repro below:
The text was updated successfully, but these errors were encountered: