Skip to content

Commit c80dd34

Browse files
authored
[Fix](Olap)Fixs uninitialized group_data_size in CompactionSampleInfo (#57523)
Fixs the uninitialized `group_data_size` in CompactionSampleInfo, which resulted in an unreasonable `batch_size` for the estimate_batch_size() method.
1 parent 70af5f0 commit c80dd34

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

be/src/olap/iterators.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ class StorageReadOptions {
156156
struct CompactionSampleInfo {
157157
int64_t bytes = 0;
158158
int64_t rows = 0;
159-
int64_t group_data_size;
159+
int64_t group_data_size = 0;
160160
};
161161

162162
struct BlockWithSameBit {

be/src/olap/merger.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ Status Merger::vertical_merge_rowsets(BaseTabletSPtr tablet, ReaderType reader_t
477477
tablet->tablet_id(), dst_rowset_writer->context().tablet_path, reader_type);
478478
{
479479
std::unique_lock<std::mutex> lock(tablet->sample_info_lock);
480-
tablet->sample_infos.resize(column_groups.size(), {0, 0, 0});
480+
tablet->sample_infos.resize(column_groups.size());
481481
}
482482
// compact group one by one
483483
for (auto i = 0; i < column_groups.size(); ++i) {

0 commit comments

Comments
 (0)