Skip to content

Commit a4febb5

Browse files
authored
fix(comptaction): use int64_t for parsing total_keys and deleted_keys (#3599)
# Summary When the number of total keys is above 2^31 the following error is present in the logs ``` [E][compaction_checker.cc:87] [compaction checker] Parse total_keys error: out of range of integer type ``` Parsing as `int64_t` match `total_keys` and `deleted_keys` type.
1 parent df6c98e commit a4febb5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/storage/compaction_checker.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,15 @@ void CompactionChecker::PickCompactionFilesForCf(const engine::ColumnFamilyConfi
8282

8383
for (const auto &property_iter : iter.second->user_collected_properties) {
8484
if (property_iter.first == "total_keys") {
85-
auto parse_result = ParseInt<int>(property_iter.second, 10);
85+
auto parse_result = ParseInt<int64_t>(property_iter.second, 10);
8686
if (!parse_result) {
8787
ERROR("[compaction checker] Parse total_keys error: {}", parse_result.Msg());
8888
continue;
8989
}
9090
total_keys = *parse_result;
9191
}
9292
if (property_iter.first == "deleted_keys") {
93-
auto parse_result = ParseInt<int>(property_iter.second, 10);
93+
auto parse_result = ParseInt<int64_t>(property_iter.second, 10);
9494
if (!parse_result) {
9595
ERROR("[compaction checker] Parse deleted_keys error: {}", parse_result.Msg());
9696
continue;

0 commit comments

Comments
 (0)