Change SstFileMetaData::size from size_t to uint64_t (#8926)

Summary:
Because even 32-bit systems can have large files

This is a "change" that I don't want intermingled with an upcoming refactoring.

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

Test Plan: CI

Reviewed By: zhichao-cao

Differential Revision: D31020974

Pulled By: pdillinger

fbshipit-source-id: ca9eb4510697df6f1f55e37b37730b88b1809a92
This commit is contained in:
Peter Dillinger 2021-09-17 12:38:21 -07:00 committed by Facebook GitHub Bot
parent 65411b8d4e
commit 4149d044cd
3 changed files with 3 additions and 2 deletions

View File

@ -27,6 +27,7 @@
### Public API change ### Public API change
* Remove obsolete implementation details FullKey and ParseFullKey from public API * Remove obsolete implementation details FullKey and ParseFullKey from public API
* Add a public API RateLimiter::GetTotalPendingRequests() for the total number of requests that are pending for bytes in the rate limiter. * Add a public API RateLimiter::GetTotalPendingRequests() for the total number of requests that are pending for bytes in the rate limiter.
* Change `SstFileMetaData::size` from `size_t` to `uint64_t`.
* Made Statistics extend the Customizable class and added a CreateFromString method. Implementations of Statistics need to be registered with the ObjectRegistry and to implement a Name() method in order to be created via this method. * Made Statistics extend the Customizable class and added a CreateFromString method. Implementations of Statistics need to be registered with the ObjectRegistry and to implement a Name() method in order to be created via this method.
* Extended `FlushJobInfo` and `CompactionJobInfo` in listener.h to provide information about the blob files generated by a flush/compaction and garbage collected during compaction in Integrated BlobDB. Added struct members `blob_file_addition_infos` and `blob_file_garbage_infos` that contain this information. * Extended `FlushJobInfo` and `CompactionJobInfo` in listener.h to provide information about the blob files generated by a flush/compaction and garbage collected during compaction in Integrated BlobDB. Added struct members `blob_file_addition_infos` and `blob_file_garbage_infos` that contain this information.
* Extended parameter `output_file_names` of `CompactFiles` API to also include paths of the blob files generated by the compaction in Integrated BlobDB. * Extended parameter `output_file_names` of `CompactFiles` API to also include paths of the blob files generated by the compaction in Integrated BlobDB.

View File

@ -62,7 +62,7 @@ struct SstFileMetaData {
file_checksum_func_name(_file_checksum_func_name) {} file_checksum_func_name(_file_checksum_func_name) {}
// File size in bytes. // File size in bytes.
size_t size; uint64_t size;
// The name of the file. // The name of the file.
std::string name; std::string name;
// The id of the file. // The id of the file.

View File

@ -5407,7 +5407,7 @@ class Benchmark {
} }
if (levelMeta.level == 0) { if (levelMeta.level == 0) {
for (auto& fileMeta : levelMeta.files) { for (auto& fileMeta : levelMeta.files) {
fprintf(stdout, "Level[%d]: %s(size: %" ROCKSDB_PRIszt " bytes)\n", fprintf(stdout, "Level[%d]: %s(size: %" PRIi64 " bytes)\n",
levelMeta.level, fileMeta.name.c_str(), fileMeta.size); levelMeta.level, fileMeta.name.c_str(), fileMeta.size);
} }
} else { } else {