recover from write fd failed
when write a part of info failed, buf_ should return to old state
This commit is contained in:
parent
4fb146810c
commit
9fdb676bce
@ -307,6 +307,7 @@ class PosixWritableFile final : public WritableFile {
|
||||
// Can't fit in buffer, so need to do at least one write.
|
||||
Status status = FlushBuffer();
|
||||
if (!status.ok()) {
|
||||
pos_ -= copy_size;
|
||||
return status;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user