mirror of
https://github.com/google/leveldb.git
synced 2025-02-10 07:30:09 +08:00
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.
|
// Can't fit in buffer, so need to do at least one write.
|
||||||
Status status = FlushBuffer();
|
Status status = FlushBuffer();
|
||||||
if (!status.ok()) {
|
if (!status.ok()) {
|
||||||
|
pos_ -= copy_size;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user