File tree Expand file tree Collapse file tree 6 files changed +12
-14
lines changed
storage/actualizer/tiering Expand file tree Collapse file tree 6 files changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -19,12 +19,15 @@ std::optional<TInstant> TTierInfo::ScalarToInstant(const std::shared_ptr<arrow::
19
19
}
20
20
}
21
21
22
- TTiering::TTieringContext TTiering::GetTierToMove (const std::shared_ptr<arrow::Scalar>& max, const TInstant now) const {
22
+ TTiering::TTieringContext TTiering::GetTierToMove (const std::shared_ptr<arrow::Scalar>& max, const TInstant now, const bool skipEviction ) const {
23
23
AFL_VERIFY (OrderedTiers.size ());
24
24
std::optional<TString> nextTierName;
25
25
std::optional<TDuration> nextTierDuration;
26
26
for (auto & tierRef : GetOrderedTiers ()) {
27
27
auto & tierInfo = tierRef.Get ();
28
+ if (skipEviction && tierInfo.GetName () != NTiering::NCommon::DeleteTierName) {
29
+ continue ;
30
+ }
28
31
auto mpiOpt = tierInfo.ScalarToInstant (max);
29
32
Y_ABORT_UNLESS (mpiOpt);
30
33
const TInstant maxTieringPortionInstant = *mpiOpt;
Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ class TTiering {
149
149
}
150
150
};
151
151
152
- TTieringContext GetTierToMove (const std::shared_ptr<arrow::Scalar>& max, const TInstant now) const ;
152
+ TTieringContext GetTierToMove (const std::shared_ptr<arrow::Scalar>& max, const TInstant now, const bool skipEviction ) const ;
153
153
154
154
const TTiersMap& GetTierByName () const {
155
155
return TierByName;
Original file line number Diff line number Diff line change @@ -43,7 +43,8 @@ std::optional<TTieringActualizer::TFullActualizationInfo> TTieringActualizer::Bu
43
43
max = it->second ;
44
44
}
45
45
}
46
- auto tieringInfo = Tiering->GetTierToMove (max, now);
46
+ const bool skipEviction = !NYDBTest::TControllers::GetColumnShardController ()->CheckPortionForEvict (portion);
47
+ auto tieringInfo = Tiering->GetTierToMove (max, now, skipEviction);
47
48
AFL_TRACE (NKikimrServices::TX_COLUMNSHARD)(" tiering_info" , tieringInfo.DebugString ());
48
49
std::optional<i64 > d;
49
50
std::set<TString> storagesWrite;
@@ -149,13 +150,7 @@ void TTieringActualizer::DoExtractTasks(
149
150
}
150
151
bool limitEnriched = false ;
151
152
for (auto && p : portions) {
152
- auto portion = externalContext.GetPortionVerified (p);
153
- if (!address.WriteIs (NBlobOperations::TGlobal::DefaultStorageId) && !address.WriteIs (NTiering::NCommon::DeleteTierName)) {
154
- if (!NYDBTest::TControllers::GetColumnShardController ()->CheckPortionForEvict (portion)) {
155
- Counters.SkipEvictionForCompaction ->Add (1 );
156
- continue ;
157
- }
158
- }
153
+ const auto & portion = externalContext.GetPortionVerified (p);
159
154
auto info = BuildActualizationInfo (*portion, tasksContext.GetActualInstant ());
160
155
AFL_VERIFY (info);
161
156
auto portionScheme = portion->GetSchema (VersionedIndex);
Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ ui64 ICSController::GetGuaranteeIndexationStartBytesLimit() const {
24
24
return DoGetGuaranteeIndexationStartBytesLimit (defaultValue);
25
25
}
26
26
27
- bool ICSController::CheckPortionForEvict (const std::shared_ptr< NOlap::TPortionInfo> & portion) const {
28
- return portion-> HasRuntimeFeature (NOlap::TPortionInfo::ERuntimeFeature::Optimized) && !portion-> HasInsertWriteId ();
27
+ bool ICSController::CheckPortionForEvict (const NOlap::TPortionInfo& portion) const {
28
+ return portion. HasRuntimeFeature (NOlap::TPortionInfo::ERuntimeFeature::Optimized) && !portion. HasInsertWriteId ();
29
29
}
30
30
31
31
}
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ class ICSController {
146
146
const std::set<NOlap::TSnapshot>& /* snapshotsToSave*/ , const std::set<NOlap::TSnapshot>& /* snapshotsToRemove*/ ) {
147
147
}
148
148
149
- virtual bool CheckPortionForEvict (const std::shared_ptr< NOlap::TPortionInfo> & portion) const ;
149
+ virtual bool CheckPortionForEvict (const NOlap::TPortionInfo& portion) const ;
150
150
151
151
TDuration GetPingCheckPeriod () const {
152
152
const TDuration defaultValue = 0.6 * GetReadTimeoutClean ();
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ class TWaitCompactionController: public NYDBTest::NColumnShard::TController {
36
36
return TDuration::Zero ();
37
37
}
38
38
public:
39
- virtual bool CheckPortionForEvict (const std::shared_ptr< TPortionInfo> & portion) const override {
39
+ virtual bool CheckPortionForEvict (const TPortionInfo& portion) const override {
40
40
if (SkipSpecialCheckForEvict) {
41
41
return true ;
42
42
} else {
You can’t perform that action at this time.
0 commit comments