| 401 | } |
| 402 | |
| 403 | bool Version::UpdateStats(const GetStats& stats) { |
| 404 | FileMetaData* f = stats.seek_file; |
| 405 | if (f != nullptr) { |
| 406 | f->allowed_seeks--; |
| 407 | if (f->allowed_seeks <= 0 && file_to_compact_ == nullptr) { |
| 408 | file_to_compact_ = f; |
| 409 | file_to_compact_level_ = stats.seek_file_level; |
| 410 | return true; |
| 411 | } |
| 412 | } |
| 413 | return false; |
| 414 | } |
| 415 | |
| 416 | bool Version::RecordReadSample(Slice internal_key) { |
| 417 | ParsedInternalKey ikey; |