-
Notifications
You must be signed in to change notification settings - Fork 11
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
Inconsistency in data if file not found between GoogleStorageWrapper and S3StorageWrapper #91
Comments
The API :
|
That would be an extra query no? I want to get the contents of file if exists otherwise null? |
No, it is a head call. Under the hood it always does multiple calls. |
Nothing major actually. The storage proxy when a file was not found, we used to get 404 because dumpb returned null. Now, it is returning 200 with empty body. The fix is to check if the body is empty before returning which I have done but just wanted to point this out |
@hemil-ruparel-blox take a look around, this is fixed now with protocol change in the Storage ensuring people must conform to this. |
Working as of 7b783ca. A file that does not exist, returns null |
In GoogleStorageWrapper, the bytes function returns null if input is null. Otherwise the raw byte array contents of the given file.
Reference - https://github.com/nmondal/cowj/blob/670c91e64a8a936341eaf03d2cd72fd1222bf25b/app/src/main/java/cowj/plugins/GoogleStorageWrapper.java#L102C5-L109C6
Meanwhile the S3StorageWrapper bytes function returns empty byte array if input is null. This means we cannot distinguish between the case when the file does not exist and when the file is not empty.
Reference - https://github.com/nmondal/cowj/blob/670c91e64a8a936341eaf03d2cd72fd1222bf25b/app/src/main/java/cowj/plugins/S3StorageWrapper.java#L85C5-L89C6
The text was updated successfully, but these errors were encountered: