This is an automated email from the ASF dual-hosted git repository.

git-hulk pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/kvrocks.git


The following commit(s) were added to refs/heads/unstable by this push:
     new a4febb5ed fix(comptaction): use int64_t for parsing total_keys and 
deleted_keys (#3599)
a4febb5ed is described below

commit a4febb5edb47fd877f88d1951b94e7f640f1149b
Author: DanFaudemer <[email protected]>
AuthorDate: Wed Aug 26 05:05:07 2026 +0200

    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.
---
 src/storage/compaction_checker.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/storage/compaction_checker.cc 
b/src/storage/compaction_checker.cc
index 0e63cd10f..a8be61b9a 100644
--- a/src/storage/compaction_checker.cc
+++ b/src/storage/compaction_checker.cc
@@ -82,7 +82,7 @@ void CompactionChecker::PickCompactionFilesForCf(const 
engine::ColumnFamilyConfi
 
     for (const auto &property_iter : iter.second->user_collected_properties) {
       if (property_iter.first == "total_keys") {
-        auto parse_result = ParseInt<int>(property_iter.second, 10);
+        auto parse_result = ParseInt<int64_t>(property_iter.second, 10);
         if (!parse_result) {
           ERROR("[compaction checker] Parse total_keys error: {}", 
parse_result.Msg());
           continue;
@@ -90,7 +90,7 @@ void CompactionChecker::PickCompactionFilesForCf(const 
engine::ColumnFamilyConfi
         total_keys = *parse_result;
       }
       if (property_iter.first == "deleted_keys") {
-        auto parse_result = ParseInt<int>(property_iter.second, 10);
+        auto parse_result = ParseInt<int64_t>(property_iter.second, 10);
         if (!parse_result) {
           ERROR("[compaction checker] Parse deleted_keys error: {}", 
parse_result.Msg());
           continue;

Reply via email to