| 2049 | } |
| 2050 | |
| 2051 | Status TmpWriteHandle::RetryWrite(RequestContext* io_ctx, TmpFile* file, int64_t offset) { |
| 2052 | DCHECK(write_in_flight_); |
| 2053 | file_ = file; |
| 2054 | write_range_->SetRange(file->path(), offset, file->AssignDiskQueue()); |
| 2055 | write_range_->SetDiskFile(file->GetWriteFile()); |
| 2056 | Status status = io_ctx->AddWriteRange(write_range_.get()); |
| 2057 | if (!status.ok()) { |
| 2058 | // The write will not be in flight if we returned with an error. |
| 2059 | write_in_flight_ = false; |
| 2060 | return status; |
| 2061 | } |
| 2062 | return Status::OK(); |
| 2063 | } |
| 2064 | |
| 2065 | void TmpWriteHandle::UploadComplete(TmpFile* tmp_file, const Status& upload_status) { |
| 2066 | if (upload_status.ok()) { |
no test coverage detected