Skip to content

Commit 6663dd7

Browse files
fix
1 parent 5e8ac60 commit 6663dd7

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

ydb/core/tx/columnshard/engines/storage/granule/granule.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,14 @@ TGranuleMeta::TGranuleMeta(
133133
ActualizationIndex = std::make_shared<NActualizer::TGranuleActualizationIndex>(PathId, versionedIndex);
134134
}
135135

136-
void TGranuleMeta::UpsertPortionOnLoad(std::shared_ptr<TPortionInfo>&& portion) {
137-
136+
void TGranuleMeta::UpsertPortionOnLoad(const std::shared_ptr<TPortionInfo>&& portion) {
138137
if (portion->HasInsertWriteId() && !portion->HasCommitSnapshot()) {
139138
const TInsertWriteId insertWriteId = portion->GetInsertWriteIdVerified();
140139
AFL_VERIFY(InsertedPortions.emplace(insertWriteId, portion).second);
141140
AFL_VERIFY(!Portions.contains(portion->GetPortionId()));
142141
} else {
143142
auto portionId = portion->GetPortionId();
144-
AFL_VERIFY(Portions.emplace(portionId, portion)).second);
143+
AFL_VERIFY(Portions.emplace(portionId, portion).second);
145144
}
146145
}
147146

@@ -175,7 +174,7 @@ void TGranuleMeta::ResetOptimizer(const std::shared_ptr<NStorageOptimizer::IOpti
175174
void TGranuleMeta::CommitPortionOnComplete(const TInsertWriteId insertWriteId, IColumnEngine& engine) {
176175
auto it = InsertedPortions.find(insertWriteId);
177176
AFL_VERIFY(it != InsertedPortions.end());
178-
(static_cast<TColumnEngineForLogs&>(engine)).AppendPortion(*it->second);
177+
(static_cast<TColumnEngineForLogs&>(engine)).AppendPortion(it->second);
179178
InsertedPortions.erase(it);
180179
}
181180

@@ -188,7 +187,7 @@ void TGranuleMeta::CommitImmediateOnExecute(
188187
}
189188

190189
void TGranuleMeta::CommitImmediateOnComplete(const std::shared_ptr<TPortionInfo> portion, IColumnEngine& engine) {
191-
(static_cast<TColumnEngineForLogs&>(engine)).AppendPortion(*portion);
190+
(static_cast<TColumnEngineForLogs&>(engine)).AppendPortion(portion);
192191
}
193192

194193
} // namespace NKikimr::NOlap

ydb/core/tx/columnshard/engines/storage/granule/granule.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ class TGranuleMeta: TNonCopyable {
308308
<< ")";
309309
}
310310

311-
void UpsertPortionOnLoad(std::shared_ptr<TPortionInfo>&& portion);
311+
void UpsertPortionOnLoad(const std::shared_ptr<TPortionInfo>&& portion);
312312

313313
const THashMap<ui64, std::shared_ptr<TPortionInfo>>& GetPortions() const {
314314
return Portions;

0 commit comments

Comments
 (0)