Skip to content

Commit

Permalink
Merge 8cfb070 into bc77d99
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanmorozov333 authored Jul 7, 2024
2 parents bc77d99 + 8cfb070 commit 81bd260
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions ydb/core/tx/columnshard/blobs_action/abstract/blob_set.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class TTabletByBlob {

class TBlobsByGenStep {
private:
struct Comparator {
struct TGenStepFromLogoBlobIdComparator {
bool operator()(const TLogoBlobID& l, const TLogoBlobID& r) const {
TGenStep gsl(l);
TGenStep gsr(r);
Expand All @@ -58,7 +58,7 @@ class TBlobsByGenStep {
}
}
};
std::set<TLogoBlobID, Comparator> Blobs;
std::set<TLogoBlobID, TGenStepFromLogoBlobIdComparator> Blobs;
public:
[[nodiscard]] bool Add(const TLogoBlobID& blobId) {
return Blobs.emplace(blobId).second;
Expand All @@ -69,7 +69,7 @@ class TBlobsByGenStep {
bool IsEmpty() const {
return Blobs.empty();
}
ui32 GetSize() const {
size_t GetSize() const {
return Blobs.size();
}

Expand All @@ -79,11 +79,12 @@ class TBlobsByGenStep {
}

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 (lessOrEqualThen < gs) {
Blobs.erase(Blobs.begin(), it);
return true;
}
Expand Down

0 comments on commit 81bd260

Please sign in to comment.