From e67232cff5ea895d7e452f9825245d7626a8e353 Mon Sep 17 00:00:00 2001 From: Andrew Kryczka Date: Thu, 23 Feb 2017 15:29:41 -0800 Subject: [PATCH] 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 --- table/sst_file_writer.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/table/sst_file_writer.cc b/table/sst_file_writer.cc index 59ae70157..42524562c 100644 --- a/table/sst_file_writer.cc +++ b/table/sst_file_writer.cc @@ -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); }