提交 e67232cf 编写于 作者: A Andrew Kryczka 提交者: Facebook Github Bot

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
上级 8efb5ffa
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册