Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: handle other selection types in comparator [173726948] #170

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

678098
Copy link
Collaborator

@678098 678098 commented Dec 8, 2023

We use comparator here:

bsl::sort(queues.begin(), queues.end(), SortPurgeQueueResultByBytesDesc());

And this functor works only for Queue selection, and doesn't work for Error selection.

struct SortPurgeQueueResultByBytesDesc {
bool operator()(const PurgeQueueResult& lhs,
const PurgeQueueResult& rhs) const
{
return (lhs.queue().numBytesPurged() > rhs.queue().numBytesPurged());
}
};

@678098 678098 requested a review from a team as a code owner December 8, 2023 23:35
@quarter-note quarter-note merged commit 5f65a2a into bloomberg:main Dec 11, 2023
7 checks passed
@678098 678098 deleted the 231208_purge_queue_crash branch December 11, 2023 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants