Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix splitter condition to avoid split micro-chunks #10375

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
4 changes: 3 additions & 1 deletion ydb/core/tx/columnshard/splitter/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ namespace NKikimr::NOlap::NSplitter {

class TSplitSettings {
private:
// DefaultMaxBlobSize - 2 * DefaultMinBlobSize have to been enought to "guarantee" records count > 1 through blobs splitting
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
Loading