pass in correct filesize in ceph backup#5369
Conversation
|
Just saw it is assigned to me. I will look into it. |
harshit-gangal
left a comment
There was a problem hiding this comment.
With this change ceph backup client will know the size of the object taken for backup upload.
There is a possibility that backup can fail based on Code Path, as maxMultipartPutObjectSize is 5TiB though unlikely as it is very high to be stored on a single host though possible.
There was a problem hiding this comment.
I think this check is not required. -1 was given when file size was not known i.e. not passed to this method. But, now the file size is known this will work irrespective if file size is actually 0 Bytes.
There was a problem hiding this comment.
The calling code passes 0 when the file size is actually unknown. This happens when we write the manifest file. We call AddFile to get a WriteCloser and we actually write to the file using that.
I can add this as a comment so that it is clearer to anyone reading the code.
The other option is to have the calling code pass -1 when file size is unknown. It doesn't look like that will break any of the other plugins. That will cleanly separate actual 0 size files from files where the size is really unknown.
There was a problem hiding this comment.
I like the other option of passing -1 for unknown file size so no special check is required in this code block and would be clean.
Yeah, we won't worry about this. |
Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
5e42bfe to
776fca4
Compare
This is a fix for #4804
Any ceph users out there who can review?
Signed-off-by: deepthi deepthi@planetscale.com