etcdserver: allow defrag on learner members#21862
Conversation
Signed-off-by: Puneet Dixit <puneetdixit200@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: puneetdixit200 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 @puneetdixit200. 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. |
Fixes #21740.
This allows learner members to serve
Maintenance.Defragmentrequests. Learners already keep the same bbolt backend as voters, and defrag is a local backend maintenance operation, so the learner RPC gate should not reject it.The PR also adds:
DefragmentRequestTests:
go test ./server/etcdserver/api/v3rpc -run TestRPCSupportedForLearnerIncludesDefragment -count=1(red first before the allowlist change)go test ./server/etcdserver/api/v3rpc -count=1go test ./tests/integration/clientv3 -run TestMaintenanceDefragmentLearner -count=1 -vgit diff --checkAI disclosure:
This PR was written in part with the assistance of generative AI. I reviewed the change and ran the tests above.
Prompt used: inspect etcd issue #21740, read the contribution guidance, add a minimal test-backed fix for learner defrag, verify it, and open a PR.
Rhyme:
etcd keeps the cluster steady and bright,
learners reclaim their storage tonight.