-
Notifications
You must be signed in to change notification settings - Fork 557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Azure Device Behavior for Non-Existent Files #1066
base: main
Are you sure you want to change the base?
Fix: Azure Device Behavior for Non-Existent Files #1066
Conversation
… draft/priyanjgupta/authSupport
…iyanjgupta-garnet-master
libs/storage/Tsavorite/cs/src/devices/AzureStorageDevice/AzureStorageDevice.cs
Outdated
Show resolved
Hide resolved
…/github.com/priyanjgupta/garnet into usr/priyanjgupta/azureDeviceBlobNotFoundFix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of nits :)
TryReadAsync(blobEntry, (long)sourceAddress, (long)destinationAddress, readLength, id); | ||
} | ||
|
||
void TryReadAsync(BlobEntry blobEntry, long sourceAddress, long destinationAddress, uint readLength, long id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
naming: This is not an async method (same goes for ReadFromBlobAsync
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The convention in AzureStorageDevice currently is that methods that perform work asynchronously end in Async, even if they are not strictly within the async-await paradigm. So I would leave it as is for this PR.
{ | ||
// If pageBlob is null, it means the blob has not been created yet. We should wait for it to be created. | ||
if (blobEntry.PageBlob.Default == null | ||
&& blobEntry.TryQueueAction(() => ReadFromBlobAsync(blobEntry, sourceAddress, destinationAddress, readLength, id))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: indent
Issue Description:
The current recovery logic uses a double buffering scan for commits, causing the page the device is searching for to spill into the next segment, which may not exist. In such cases, the device repeatedly retries to find the non-existent file, resulting in a 90-second hang and eventually a "blob not found" error. This causes all subsequent read/write requests to be canceled under the current implementation. In contrast, the local device creates the file when it encounters a non-existent file. This PR aims to align the behavior between both device implementations.
Steps to reproduce the bug:
Start garnet server with following flags
After the blob not found error, subsequent writes should fail to commit.
Screenshots
Expected Behavior
