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::
1919 }
2020}
2121
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 {
2323 AFL_VERIFY (OrderedTiers.size ());
2424 std::optional<TString> nextTierName;
2525 std::optional<TDuration> nextTierDuration;
2626 for (auto & tierRef : GetOrderedTiers ()) {
2727 auto & tierInfo = tierRef.Get ();
28+ if (skipEviction && tierInfo.GetName () != NTiering::NCommon::DeleteTierName) {
29+ continue ;
30+ }
2831 auto mpiOpt = tierInfo.ScalarToInstant (max);
2932 Y_ABORT_UNLESS (mpiOpt);
3033 const TInstant maxTieringPortionInstant = *mpiOpt;
Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ class TTiering {
149149 }
150150 };
151151
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 ;
153153
154154 const TTiersMap& GetTierByName () const {
155155 return TierByName;
Original file line number Diff line number Diff line change @@ -43,7 +43,8 @@ std::optional<TTieringActualizer::TFullActualizationInfo> TTieringActualizer::Bu
4343 max = it->second ;
4444 }
4545 }
46- auto tieringInfo = Tiering->GetTierToMove (max, now);
46+ const bool skipEviction = !NYDBTest::TControllers::GetColumnShardController ()->CheckPortionForEvict (portion);
47+ auto tieringInfo = Tiering->GetTierToMove (max, now, skipEviction);
4748 AFL_TRACE (NKikimrServices::TX_COLUMNSHARD)(" tiering_info" , tieringInfo.DebugString ());
4849 std::optional<i64 > d;
4950 std::set<TString> storagesWrite;
@@ -149,13 +150,7 @@ void TTieringActualizer::DoExtractTasks(
149150 }
150151 bool limitEnriched = false ;
151152 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);
159154 auto info = BuildActualizationInfo (*portion, tasksContext.GetActualInstant ());
160155 AFL_VERIFY (info);
161156 auto portionScheme = portion->GetSchema (VersionedIndex);
Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ ui64 ICSController::GetGuaranteeIndexationStartBytesLimit() const {
2424 return DoGetGuaranteeIndexationStartBytesLimit (defaultValue);
2525}
2626
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 ();
2929}
3030
3131}
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ class ICSController {
146146 const std::set<NOlap::TSnapshot>& /* snapshotsToSave*/ , const std::set<NOlap::TSnapshot>& /* snapshotsToRemove*/ ) {
147147 }
148148
149- virtual bool CheckPortionForEvict (const std::shared_ptr< NOlap::TPortionInfo> & portion) const ;
149+ virtual bool CheckPortionForEvict (const NOlap::TPortionInfo& portion) const ;
150150
151151 TDuration GetPingCheckPeriod () const {
152152 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 {
3636 return TDuration::Zero ();
3737 }
3838public:
39- virtual bool CheckPortionForEvict (const std::shared_ptr< TPortionInfo> & portion) const override {
39+ virtual bool CheckPortionForEvict (const TPortionInfo& portion) const override {
4040 if (SkipSpecialCheckForEvict) {
4141 return true ;
4242 } else {
You can’t perform that action at this time.
0 commit comments