Handle failed Finish() in SST file writer
Summary: The assertion in Abandon() fails when called after Finish() fails. Finish() already closes the builder so there's no need to call Abandon(). Closes https://github.com/facebook/rocksdb/pull/1901 Differential Revision: D4601373 Pulled By: ajkr fbshipit-source-id: e5678be
This commit is contained in:
parent
8efb5ffa2a
commit
e67232cff5
@ -189,10 +189,7 @@ Status SstFileWriter::Finish(ExternalSstFileInfo* file_info) {
|
||||
if (s.ok()) {
|
||||
s = r->file_writer->Close();
|
||||
}
|
||||
} else {
|
||||
r->builder->Abandon();
|
||||
}
|
||||
|
||||
if (!s.ok()) {
|
||||
r->ioptions.env->DeleteFile(r->file_info.file_path);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user