mirror of https://github.com/facebook/rocksdb.git
DBImpl::GetWalPreallocateBlockSize() should return size_t
Summary: WritableFile::SetPreallocationBlockSize() requires parameter as size_t, and options used in DBImpl::GetWalPreallocateBlockSize() are all size_t. WritableFile::SetPreallocationBlockSize() should return size_t to avoid build break if size_t is not uint64_t. Test Plan: Run existing tests. Reviewers: andrewkr, IslamAbdelRahman, yiwu Reviewed By: yiwu Subscribers: leveldb, andrewkr, dhruba Differential Revision: https://reviews.facebook.net/D64137
This commit is contained in:
parent
42ac9c5f1e
commit
d78a4401b5
|
@ -3682,8 +3682,8 @@ bool DBImpl::MCOverlap(ManualCompaction* m, ManualCompaction* m1) {
|
|||
return true;
|
||||
}
|
||||
|
||||
uint64_t DBImpl::GetWalPreallocateBlockSize(uint64_t write_buffer_size) const {
|
||||
uint64_t bsize = write_buffer_size / 10 + write_buffer_size;
|
||||
size_t DBImpl::GetWalPreallocateBlockSize(uint64_t write_buffer_size) const {
|
||||
size_t bsize = write_buffer_size / 10 + write_buffer_size;
|
||||
// Some users might set very high write_buffer_size and rely on
|
||||
// max_total_wal_size or other parameters to control the WAL size.
|
||||
if (db_options_.max_total_wal_size > 0) {
|
||||
|
|
|
@ -1068,7 +1068,7 @@ class DBImpl : public DB {
|
|||
bool HaveManualCompaction(ColumnFamilyData* cfd);
|
||||
bool MCOverlap(ManualCompaction* m, ManualCompaction* m1);
|
||||
|
||||
uint64_t GetWalPreallocateBlockSize(uint64_t write_buffer_size) const;
|
||||
size_t GetWalPreallocateBlockSize(uint64_t write_buffer_size) const;
|
||||
};
|
||||
|
||||
// Sanitize db options. The caller should delete result.info_log if
|
||||
|
|
Loading…
Reference in New Issue