You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately, async operation cancellation can corrupt data on disk and break the consistency of data in memory. We can't fix this completely, because cancellation can happen at any point where .await is used. But we can improve the situation and prevent data corruption on disk:
We need to set an offset in the record header (https://github.com/qoollo/pearl/blob/master/src/blob/core.rs#L274), but with new approach it becomes harder. We need to transfer a special structure directly to the place where the data is written to the file, which allows to patch the data with the offset value. Such struct will be added in this PR: 188 serialize outside lock #220. Also we should return the offset value to the caller, so it can also change value within header struct
The text was updated successfully, but these errors were encountered:
Unfortunately, async operation cancellation can corrupt data on disk and break the consistency of data in memory. We can't fix this completely, because cancellation can happen at any point where
.await
is used. But we can improve the situation and prevent data corruption on disk:offset
on Blob level and only track it on File level.await
. We have to move the offset update right into place before the synchronous write happens: https://github.com/qoollo/pearl/blob/master/src/blob/file.rs#L96offset
value. Such struct will be added in this PR: 188 serialize outside lock #220. Also we should return the offset value to the caller, so it can also change value within header structThe text was updated successfully, but these errors were encountered: