-
Notifications
You must be signed in to change notification settings - Fork 441
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
[Do not review] Sync/flush changes for buffered writes #2778
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2778 +/- ##
==========================================
+ Coverage 76.51% 76.62% +0.10%
==========================================
Files 116 116
Lines 16065 16106 +41
==========================================
+ Hits 12292 12341 +49
+ Misses 3257 3251 -6
+ Partials 516 514 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
5f28336
to
67e8432
Compare
c9e4170
to
f60c3aa
Compare
internal/fs/inode/file.go
Outdated
return | ||
} | ||
|
||
if f.bwh != nil { | ||
// Finalize the object. | ||
return f.flushBufferedWriteHandlerAndUpdateInode() |
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.
we shouldn't flush on sync call.
from LLD:
Sync() can be called multiple times during the lifetime of the file write. Once the resumable upload is finalized we will not be able to append anymore data to it. But the intention of sync() call from the application side, is to persist all the data to the backend device. So we will block the syncFile() call and upload all pending buffers to GCS and free up the free buffers. We will not finalize the upload.
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.
Hey, I wanted to follow this. Is it possible to get access to the LLD?
a1c083e
to
2d08215
Compare
2d08215
to
4a9d15c
Compare
4a9d15c
to
538c48f
Compare
Description
This PR includes changes to
Some refactoring is done to reuse the code.
Note: Flush empty file changes required precondition to be propagated to gcs request and will be taken up in the follow up PR. Unit tests are not added for it.
Link to the issue in case of a bug fix.
NA
Testing details