cache: add k8s-aligned ringbuffer helpers#21676
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: yedou37 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @yedou37. Thanks for your PR. I'm waiting for a etcd-io member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Add Len, ReplaceLatest, RemoveLess, and ensureCapacity to ringBuffer, and cover them with focused unit tests. These helpers are not used in etcd today, but they keep the ringBuffer implementation aligned with the k8s snapshot ring work discussed at: kubernetes/kubernetes#138338 (comment) Signed-off-by: YeRongyu <yedou37@zju.edu.cn>
518deec to
6451452
Compare
|
/ok-to-test |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted filessee 79 files with indirect coverage changes @@ Coverage Diff @@
## main #21676 +/- ##
==========================================
+ Coverage 68.48% 70.33% +1.85%
==========================================
Files 432 426 -6
Lines 35540 35215 -325
==========================================
+ Hits 24339 24768 +429
+ Misses 9789 9056 -733
+ Partials 1412 1391 -21 Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Add Len, ReplaceLatest, RemoveLess, and ensureCapacity functions to ringBuffer, and cover them with unit tests.
These helpers are not used in etcd today, but they keep the ringBuffer implementation aligned with the k8s snapshot ring work discussed at: kubernetes/kubernetes#138338 (comment)