提交 c4d0e66d 编写于 作者: S sunby 提交者: Facebook GitHub Bot

Remove check for status returned by `InvalidatePageCache` (#8156)

Summary:
Failures in `InvalidatePageCache` will change the API contract. So we remove the status check for `InvalidatePageCache` in `SstFileWriter::Add()`, `SstFileWriter::Finish` and `Rep::DeleteRange`

Pull Request resolved: https://github.com/facebook/rocksdb/pull/8156

Reviewed By: riversand963

Differential Revision: D27597012

Pulled By: ajkr

fbshipit-source-id: 2872051695d50cc47ed0f2848dc582464c00076f
上级 2d8518f5
......@@ -99,7 +99,8 @@ struct SstFileWriter::Rep {
file_info.largest_key.assign(user_key.data(), user_key.size());
file_info.file_size = builder->FileSize();
return InvalidatePageCache(false /* closing */);
InvalidatePageCache(false /* closing */).PermitUncheckedError();
return Status::OK();
}
Status DeleteRange(const Slice& begin_key, const Slice& end_key) {
......@@ -133,7 +134,8 @@ struct SstFileWriter::Rep {
file_info.num_range_del_entries++;
file_info.file_size = builder->FileSize();
return InvalidatePageCache(false /* closing */);
InvalidatePageCache(false /* closing */).PermitUncheckedError();
return Status::OK();
}
Status InvalidatePageCache(bool closing) {
......@@ -308,9 +310,7 @@ Status SstFileWriter::Finish(ExternalSstFileInfo* file_info) {
if (s.ok()) {
s = r->file_writer->Sync(r->ioptions.use_fsync);
if (s.ok()) {
s = r->InvalidatePageCache(true /* closing */);
}
r->InvalidatePageCache(true /* closing */).PermitUncheckedError();
if (s.ok()) {
s = r->file_writer->Close();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册