logpuller: extract generic priority queue (#5487) - #5750
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lidezhu The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This is an automated cherry-pick of #5487
What problem does this PR solve?
Issue Number: close #5488
What is changed and how it works?
This pull request refactors the priority queue used in the log service into a generic utility package. By moving this logic to
utils/priorityqueue, the codebase reduces duplication and provides a more robust, thread-safe implementation that can be leveraged by other components. The changes include updating existing consumers to use the new generic queue and ensuring proper error handling during queue closure.Highlights
logservice/logpullerinto a generic, reusableutils/priorityqueuepackage.Popmechanism with properErrClosedhandling.PriorityQueueimplementation inlogservice/logpullerand updated all references to use the new utility.Check List
Tests
Questions
Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?
Release note
Summary by CodeRabbit