Skip to content

Commit

Permalink
[C#] WaitAsync should return false if iterator has reached end of sca…
Browse files Browse the repository at this point in the history
…n range.
  • Loading branch information
badrishc committed May 21, 2021
1 parent 5501dfb commit 93ce594
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cs/src/core/Index/FasterLog/FasterLogIterator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ public ValueTask<bool> WaitAsync(CancellationToken token = default)

if (!scanUncommitted)
{
if (NextAddress >= endAddress)
return new ValueTask<bool>(false);
if (NextAddress < fasterLog.CommittedUntilAddress)
return new ValueTask<bool>(true);

Expand Down

0 comments on commit 93ce594

Please sign in to comment.