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

[release-3.5] Add e2e test to verify etcd is able to automatically fix the issue #19629

Merged
merged 1 commit into from
Mar 20, 2025

Conversation

ahrtr
Copy link
Member

@ahrtr ahrtr commented Mar 19, 2025

@ahrtr ahrtr force-pushed the learner_test_20250319 branch 2 times, most recently from f1aa95b to a274288 Compare March 19, 2025 10:00
Copy link
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

LGTM

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahrtr, fuweid

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ahrtr ahrtr force-pushed the learner_test_20250319 branch 2 times, most recently from c4d8012 to 15134ba Compare March 19, 2025 17:17
@fuweid
Copy link
Member

fuweid commented Mar 19, 2025

ping @serathius @siyuanfoundation

We don't need further code change. ETCD server always publishes member's attributes during starting. This update is updated through RAFT. In v3.5 release, member information is from v2 store, which is always valid and correctness. For the UpdateAttributes, it gets member info from v2 store data, updates attributes and then applies it into backend. Since this raft log index is higher than applied in v3 backend, so UpdateAttributes always applies change into v3 backend.

func (c *RaftCluster) UpdateAttributes(id types.ID, attr Attributes, shouldApplyV3 ShouldApplyV3) {
c.Lock()
defer c.Unlock()
if m, ok := c.members[id]; ok {
m.Attributes = attr
if c.v2store != nil {
mustUpdateMemberAttrInStore(c.lg, c.v2store, m)
}
if c.be != nil && shouldApplyV3 {
unsafeSaveMemberToBackend(c.lg, c.be, m)
}
return

Since we already allows ETCD to override existing member information, this publish call will help us do migration. So we don't need code change. Just add e2e test to ensure that.

@ahrtr ahrtr force-pushed the learner_test_20250319 branch 2 times, most recently from 1ea1162 to fcd80db Compare March 20, 2025 07:52
caused by etcd-io#19557

Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
@ahrtr ahrtr force-pushed the learner_test_20250319 branch from fcd80db to 0a51fc2 Compare March 20, 2025 08:32
@siyuanfoundation
Copy link
Contributor

/lgtm

@ahrtr ahrtr merged commit c518f6f into etcd-io:release-3.5 Mar 20, 2025
25 checks passed
@ahrtr
Copy link
Member Author

ahrtr commented Mar 20, 2025

@ivanvc we are ready to release 3.5.20

@ahrtr ahrtr mentioned this pull request Mar 20, 2025
1 task
@ahrtr ahrtr deleted the learner_test_20250319 branch March 20, 2025 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

5 participants