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

clientv3: filter learner members during autosync #13837

Merged
merged 1 commit into from
Apr 9, 2022
Merged

clientv3: filter learner members during autosync #13837

merged 1 commit into from
Apr 9, 2022

Conversation

chrisayoub
Copy link
Contributor

This change is to ensure that all members returned during the client's
AutoSync are started and are not learners, which are not valid
etcd members to make requests to.

I have tested this patch with Kubernetes as a client and it works as intended.

@chrisayoub chrisayoub changed the title clientv3: filter learners members during autosync clientv3: filter learner members during autosync Mar 24, 2022
@codecov-commenter
Copy link

codecov-commenter commented Mar 25, 2022

Codecov Report

Merging #13837 (cc1b6fa) into main (4019c59) will decrease coverage by 0.17%.
The diff coverage is 100.00%.

❗ Current head cc1b6fa differs from pull request most recent head 125f3c3. Consider uploading reports for the commit 125f3c3 to get more accurate results

@@            Coverage Diff             @@
##             main   #13837      +/-   ##
==========================================
- Coverage   72.54%   72.37%   -0.18%     
==========================================
  Files         468      468              
  Lines       38222    38223       +1     
==========================================
- Hits        27730    27664      -66     
- Misses       8709     8763      +54     
- Partials     1783     1796      +13     
Flag Coverage Δ
all 72.37% <100.00%> (-0.18%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
client/v3/client.go 80.89% <100.00%> (+2.29%) ⬆️
server/auth/simple_token.go 80.00% <0.00%> (-8.47%) ⬇️
client/pkg/v3/fileutil/lock_linux.go 72.22% <0.00%> (-8.34%) ⬇️
server/storage/mvcc/watchable_store.go 85.14% <0.00%> (-4.72%) ⬇️
server/storage/wal/file_pipeline.go 90.69% <0.00%> (-4.66%) ⬇️
server/etcdserver/api/v3rpc/watch.go 84.89% <0.00%> (-3.70%) ⬇️
api/etcdserverpb/raft_internal_stringer.go 76.78% <0.00%> (-3.58%) ⬇️
client/v3/leasing/txn.go 88.09% <0.00%> (-3.18%) ⬇️
server/etcdserver/util.go 85.71% <0.00%> (-3.18%) ⬇️
server/etcdserver/api/v3compactor/periodic.go 87.50% <0.00%> (-2.50%) ⬇️
... and 18 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4019c59...125f3c3. Read the comment docs.

client/v3/client_test.go Outdated Show resolved Hide resolved
This change is to ensure that all members returned during the client's
AutoSync are started and are not learners, which are not valid
etcd members to make requests to.
Copy link
Member

@ahrtr ahrtr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thank you.

cc @serathius @ptabor @spzala

@chrisayoub
Copy link
Contributor Author

@ahrtr it says First-time contributors need a maintainer to approve running workflows. I assume I need some sort of approval for this to merge?

@chrisayoub
Copy link
Contributor Author

@serathius anything else we need here before merging?

@serathius
Copy link
Member

Second maintainer approval. cc @ptabor @spzala

@serathius serathius mentioned this pull request Apr 6, 2022
28 tasks
Copy link
Member

@spzala spzala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @chrisayoub
lgtm

@serathius
Copy link
Member

Note, I think we should have an e2e tests with learners.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants