Set actual file size. The function should only be called once during the lifetime of the DiskFile.
| 305 | /// Set actual file size. |
| 306 | /// The function should only be called once during the lifetime of the DiskFile. |
| 307 | void SetActualFileSize(int64_t size) { |
| 308 | DCHECK_EQ(0, actual_file_size_.Load()); |
| 309 | DCHECK_LE(file_size_, size); |
| 310 | actual_file_size_.Store(size); |
| 311 | } |
| 312 | |
| 313 | // Update the metadata of read buffer if the file is batch read enabled. |
| 314 | // The metadata of read buffer is set when the file is written, because each page may |