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

colinlee pushed a commit to branch colin_fix_read_overflow
in repository https://gitbox.apache.org/repos/asf/tsfile.git


The following commit(s) were added to refs/heads/colin_fix_read_overflow by 
this push:
     new d8d03d5a fix filesize overflow.
d8d03d5a is described below

commit d8d03d5ab2be7629bc9566d7ceae6be8dd1193fa
Author: ColinLee <[email protected]>
AuthorDate: Thu May 15 19:55:13 2025 +0800

    fix filesize overflow.
---
 cpp/src/file/tsfile_io_reader.cc | 2 +-
 cpp/src/file/tsfile_io_reader.h  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cpp/src/file/tsfile_io_reader.cc b/cpp/src/file/tsfile_io_reader.cc
index a2566959..7aef08df 100644
--- a/cpp/src/file/tsfile_io_reader.cc
+++ b/cpp/src/file/tsfile_io_reader.cc
@@ -136,7 +136,7 @@ int TsFileIOReader::load_tsfile_meta() {
 
   int ret = E_OK;
   uint32_t tsfile_meta_size = 0;
-  int32_t read_offset = 0;
+  int64_t read_offset = 0;
   int32_t ret_read_len = 0;
 
   // Step 1: reader the tsfile_meta_size
diff --git a/cpp/src/file/tsfile_io_reader.h b/cpp/src/file/tsfile_io_reader.h
index bd4a293a..e46e55aa 100644
--- a/cpp/src/file/tsfile_io_reader.h
+++ b/cpp/src/file/tsfile_io_reader.h
@@ -86,7 +86,7 @@ class TsFileIOReader {
         common::PageArena &pa);
 
    private:
-    FORCE_INLINE int32_t file_size() const { return read_file_->file_size(); }
+    FORCE_INLINE int64_t file_size() const { return read_file_->file_size(); }
 
     int load_tsfile_meta();
 

Reply via email to