diff options
author | ivanmorozov333 <ivanmorozov@ydb.tech> | 2024-07-07 16:52:02 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-07 16:52:02 +0300 |
commit | 77685b397d60a5d89da48408aed9e3735ce6479d (patch) | |
tree | bd68fc3b263546db43c2927e0ca81ad2a051f551 | |
parent | bc77d99eea5d69402f7a0806f930529a8c3c7df8 (diff) | |
download | ydb-77685b397d60a5d89da48408aed9e3735ce6479d.tar.gz |
corrections for gc tasks construction (#6376)
-rw-r--r-- | ydb/core/tx/columnshard/blobs_action/abstract/blob_set.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/ydb/core/tx/columnshard/blobs_action/abstract/blob_set.h b/ydb/core/tx/columnshard/blobs_action/abstract/blob_set.h index 51db43f0f0..ea5844f5dd 100644 --- a/ydb/core/tx/columnshard/blobs_action/abstract/blob_set.h +++ b/ydb/core/tx/columnshard/blobs_action/abstract/blob_set.h @@ -47,7 +47,7 @@ public: class TBlobsByGenStep { private: - struct Comparator { + struct TGenStepFromLogoBlobIdComparator { bool operator()(const TLogoBlobID& l, const TLogoBlobID& r) const { TGenStep gsl(l); TGenStep gsr(r); @@ -58,7 +58,7 @@ private: } } }; - std::set<TLogoBlobID, Comparator> Blobs; + std::set<TLogoBlobID, TGenStepFromLogoBlobIdComparator> Blobs; public: [[nodiscard]] bool Add(const TLogoBlobID& blobId) { return Blobs.emplace(blobId).second; @@ -69,7 +69,7 @@ public: bool IsEmpty() const { return Blobs.empty(); } - ui32 GetSize() const { + size_t GetSize() const { return Blobs.size(); } @@ -79,11 +79,12 @@ public: } template <class TActor> - bool ExtractTo(const TGenStep includeBorder, const ui32 countLimit, const TActor& actor) { + requires std::invocable<TActor&, const TGenStep&, const TLogoBlobID&> + bool ExtractTo(const TGenStep& lessOrEqualThan, const ui32 countLimit, const TActor& actor) { ui32 idx = 0; for (auto it = Blobs.begin(); it != Blobs.end(); ++it) { TGenStep gs(*it); - if (includeBorder < gs) { + if (lessOrEqualThan < gs) { Blobs.erase(Blobs.begin(), it); return true; } |