Fix write-ahead log file size overflow (#7870)
Summary: The WAL's file size is stored as an unsigned 64 bit integer. In db_info_dumper.cc, this integer gets converted to a string. Since 2^64 is approximately 10^19, we need 20 digits to represent the integer correctly. To store the decimal representation, we need 21 bytes (+1 due to the '\0' terminator at the end). The code previously used 16 bytes, which would overflow if the log is really big (>1 petabyte). Pull Request resolved: https://github.com/facebook/rocksdb/pull/7870 Reviewed By: ajkr Differential Revision: D25938776 Pulled By: jay-zhuang fbshipit-source-id: 6ee9e21ebd65d297ea90fa1e7e74f3e1c533299dmain
parent
5b748b9e68
commit
4db58bcfb2
Loading…
Reference in new issue