Skip to content

Commit

Permalink
Merge pull request #479 from microsoft/fasterlog-waitasync-end-false
Browse files Browse the repository at this point in the history
[C#] Fixes to WaitAsync, list Azure device contents
  • Loading branch information
badrishc authored May 21, 2021
2 parents 5501dfb + d10b9d5 commit 1b3100d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
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
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public IEnumerable<FileDescriptor> ListContents(string path)
};
}

foreach (var entry in baseRef.ListBlobs().Where(b => b as CloudPageBlob != null)
foreach (var entry in baseRef.GetDirectoryReference(path).ListBlobs().Where(b => b as CloudPageBlob != null)
.OrderByDescending(f => ((CloudPageBlob)f).Properties.LastModified))
{
yield return new FileDescriptor
Expand Down

0 comments on commit 1b3100d

Please sign in to comment.