Skip to content

Commit

Permalink
fix tx volume calculation for inserted chunks (#10813)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanmorozov333 authored Oct 24, 2024
1 parent 71df826 commit c71ca85
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ydb/core/tx/columnshard/engines/insert_table/meta.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ class TInsertedDataMeta {

public:
ui64 GetTxVolume() const {
return 2 * sizeof(ui64) + sizeof(ui32) + sizeof(OriginalProto) + (SpecialKeysParsed ? SpecialKeysParsed->GetMemoryBytes() : 0);
return 512 + 2 * sizeof(ui64) + sizeof(ui32) + sizeof(OriginalProto) + (SpecialKeysParsed ? SpecialKeysParsed->GetMemoryBytes() : 0) +
SchemaSubset.GetTxVolume();
}

TInsertedDataMeta(const NKikimrTxColumnShard::TLogicalMetadata& proto)
Expand Down
4 changes: 4 additions & 0 deletions ydb/library/formats/arrow/modifier/subset.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ class TSchemaSubset {
TSchemaSubset() = default;
TSchemaSubset(const std::set<ui32>& fieldsIdx, const ui32 fieldsCount);

ui64 GetTxVolume() const {
return FieldBits.size() + FieldIdx.size() * sizeof(ui32) + 1;
}

static TSchemaSubset AllFieldsAccepted() {
TSchemaSubset result;
result.Exclude = true;
Expand Down

0 comments on commit c71ca85

Please sign in to comment.