Skip to content

Commit

Permalink
fix splitter condition for avoid split micro-chunks
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanmorozov333 committed Oct 14, 2024
1 parent 7258b98 commit 67edc94
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ydb/core/tx/columnshard/splitter/batch_slice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ bool TGeneralSerializedSlice::GroupBlobsImpl(const NSplitter::TGroupFeatures& fe
chunksInProgress.PopFront(i);
hasNoSplitChanges = true;
} else {
// in this case chunksInProgress[i] size >= Max - Min for case nextPartSize >= features.GetSplitSettings().GetMaxBlobSize()
// in this case chunksInProgress[i] size >= Max - 2 * Min for case nextOtherSize < features.GetSplitSettings().GetMinBlobSize()
Y_ABORT_UNLESS((i64)chunksInProgress[i]->GetPackedSize() > features.GetSplitSettings().GetMinBlobSize() - partSize);
Y_ABORT_UNLESS(otherSize - (features.GetSplitSettings().GetMinBlobSize() - partSize) >= features.GetSplitSettings().GetMinBlobSize());

Expand Down
2 changes: 1 addition & 1 deletion ydb/core/tx/columnshard/splitter/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace NKikimr::NOlap::NSplitter {
class TSplitSettings {
private:
static const inline i64 DefaultMaxBlobSize = 8 * 1024 * 1024;
static const inline i64 DefaultMinBlobSize = 4 * 1024 * 1024;
static const inline i64 DefaultMinBlobSize = 3 * 1024 * 1024;
static const inline i64 DefaultMinRecordsCount = 10000;
static const inline i64 DefaultMaxPortionSize = 6 * DefaultMaxBlobSize;
YDB_ACCESSOR(i64, MaxBlobSize, DefaultMaxBlobSize);
Expand Down

0 comments on commit 67edc94

Please sign in to comment.