Skip to content

Commit e2fabd1

Browse files
fix splitter condition to avoid split micro-chunks (#10375)
1 parent e598567 commit e2fabd1

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

ydb/core/tx/columnshard/splitter/batch_slice.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ bool TGeneralSerializedSlice::GroupBlobsImpl(const NSplitter::TGroupFeatures& fe
9999
chunksInProgress.PopFront(i);
100100
hasNoSplitChanges = true;
101101
} else {
102+
// in this case chunksInProgress[i] size >= Max - Min for case nextPartSize >= features.GetSplitSettings().GetMaxBlobSize()
103+
// in this case chunksInProgress[i] size >= Max - 2 * Min for case nextOtherSize < features.GetSplitSettings().GetMinBlobSize()
102104
Y_ABORT_UNLESS((i64)chunksInProgress[i]->GetPackedSize() > features.GetSplitSettings().GetMinBlobSize() - partSize);
103105
Y_ABORT_UNLESS(otherSize - (features.GetSplitSettings().GetMinBlobSize() - partSize) >= features.GetSplitSettings().GetMinBlobSize());
104106

ydb/core/tx/columnshard/splitter/settings.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ namespace NKikimr::NOlap::NSplitter {
1414

1515
class TSplitSettings {
1616
private:
17+
// DefaultMaxBlobSize - 2 * DefaultMinBlobSize have to been enought to "guarantee" records count > 1 through blobs splitting
1718
static const inline i64 DefaultMaxBlobSize = 8 * 1024 * 1024;
18-
static const inline i64 DefaultMinBlobSize = 4 * 1024 * 1024;
19+
static const inline i64 DefaultMinBlobSize = 3 * 1024 * 1024;
20+
1921
static const inline i64 DefaultMinRecordsCount = 10000;
2022
static const inline i64 DefaultMaxPortionSize = 6 * DefaultMaxBlobSize;
2123
YDB_ACCESSOR(i64, MaxBlobSize, DefaultMaxBlobSize);

0 commit comments

Comments
 (0)