| 362 | } |
| 363 | |
| 364 | void TableBuilder::AppendToCacheFile(const Slice& slice) { |
| 365 | if (!rep_->cache_file) { |
| 366 | return; |
| 367 | } |
| 368 | auto s = rep_->cache_file->Append(slice); |
| 369 | if (!s.ok()) { |
| 370 | LEVELDB_LOG("Append to cache file failed: %s : %s\n", rep_->cache_file->Path().c_str(), |
| 371 | s.ToString().c_str()); |
| 372 | rep_->cache_file->Abandon(); |
| 373 | rep_->cache_file = nullptr; |
| 374 | } |
| 375 | } |
| 376 | } // leveldb |