From 93ce594448bcf21f6ca7c18e8290911fb3c044fa Mon Sep 17 00:00:00 2001 From: Badrish Chandramouli Date: Thu, 20 May 2021 18:11:30 -0700 Subject: [PATCH 1/2] [C#] WaitAsync should return false if iterator has reached end of scan range. --- cs/src/core/Index/FasterLog/FasterLogIterator.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cs/src/core/Index/FasterLog/FasterLogIterator.cs b/cs/src/core/Index/FasterLog/FasterLogIterator.cs index ba558ea37..363881ca2 100644 --- a/cs/src/core/Index/FasterLog/FasterLogIterator.cs +++ b/cs/src/core/Index/FasterLog/FasterLogIterator.cs @@ -116,6 +116,8 @@ public ValueTask WaitAsync(CancellationToken token = default) if (!scanUncommitted) { + if (NextAddress >= endAddress) + return new ValueTask(false); if (NextAddress < fasterLog.CommittedUntilAddress) return new ValueTask(true); From d10b9d5696597e312f396148b7a4d37aadd42b9f Mon Sep 17 00:00:00 2001 From: Badrish Chandramouli Date: Thu, 20 May 2021 18:35:19 -0700 Subject: [PATCH 2/2] Fix azure blob list contents logic --- .../AzureStorageDevice/AzureStorageNamedDeviceFactory.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cs/src/devices/AzureStorageDevice/AzureStorageNamedDeviceFactory.cs b/cs/src/devices/AzureStorageDevice/AzureStorageNamedDeviceFactory.cs index 852d7223f..aa4dd3b94 100644 --- a/cs/src/devices/AzureStorageDevice/AzureStorageNamedDeviceFactory.cs +++ b/cs/src/devices/AzureStorageDevice/AzureStorageNamedDeviceFactory.cs @@ -91,7 +91,7 @@ public IEnumerable 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