diff --git a/port/win/win_logger.h b/port/win/win_logger.h index 87c4dfe46..a85f24c83 100644 --- a/port/win/win_logger.h +++ b/port/win/win_logger.h @@ -23,8 +23,6 @@ namespace rocksdb { class Env; -const int kDebugLogChunkSize = 128 * 1024; - class WinLogger : public rocksdb::Logger { public: WinLogger(uint64_t (*gettid)(), Env* env, HANDLE file, diff --git a/util/coding.h b/util/coding.h index 6aaf403a3..078a03c2f 100644 --- a/util/coding.h +++ b/util/coding.h @@ -23,8 +23,7 @@ namespace rocksdb { -// The maximum length of a varint in bytes for 32 and 64 bits respectively. -const unsigned int kMaxVarint32Length = 5; +// The maximum length of a varint in bytes for 64-bit. const unsigned int kMaxVarint64Length = 10; // Standard Put... routines append to a string diff --git a/util/posix_logger.h b/util/posix_logger.h index 61bb9e38a..f9b93afdb 100644 --- a/util/posix_logger.h +++ b/util/posix_logger.h @@ -30,8 +30,6 @@ namespace rocksdb { -const int kDebugLogChunkSize = 128 * 1024; - class PosixLogger : public Logger { private: FILE* file_; @@ -129,6 +127,8 @@ class PosixLogger : public Logger { const size_t write_size = p - base; #ifdef ROCKSDB_FALLOCATE_PRESENT + const int kDebugLogChunkSize = 128 * 1024; + // If this write would cross a boundary of kDebugLogChunkSize // space, pre-allocate more space to avoid overly large // allocations from filesystem allocsize options.