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

Include last-committed data in publication #92277

Merged
merged 1 commit into from
Dec 12, 2022

Conversation

DaveCTurner
Copy link
Contributor

The cluster coordination consistency layer relies on a couple of fields within Metadata which record the last committed values on each node. In contrast, the rest of the cluster state can only be changed at accept time.

In the past we would copy these fields over from the master on every publication, but since #90101 we don't copy anything at all if the Metadata is unchanged on the master. However, the master computes the diff against the last committed state whereas the receiving nodes apply the diff to the last accepted state, and this means if the master sends a no-op Metadata diff then the receiving node will revert its last-committed values to the ones included in the state it last accepted.

With this commit we include the last-committed values alongside the cluster state diff so that they are always copied properly.

Closes #90158
Backport of #92259 to 8.6

The cluster coordination consistency layer relies on a couple of fields
within `Metadata` which record the last _committed_ values on each node.
In contrast, the rest of the cluster state can only be changed at
_accept_ time.

In the past we would copy these fields over from the master on every
publication, but since elastic#90101 we don't copy anything at all if the
`Metadata` is unchanged on the master. However, the master computes the
diff against the last _committed_ state whereas the receiving nodes
apply the diff to the last _accepted_ state, and this means if the
master sends a no-op `Metadata` diff then the receiving node will revert
its last-committed values to the ones included in the state it last
accepted.

With this commit we include the last-committed values alongside the
cluster state diff so that they are always copied properly.

Closes elastic#90158
Backport of elastic#92259 to 8.6
@DaveCTurner DaveCTurner added :Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. backport v8.6.0 labels Dec 12, 2022
@DaveCTurner DaveCTurner merged commit 890f010 into elastic:8.6 Dec 12, 2022
@DaveCTurner DaveCTurner deleted the 2022-12-12-backport-92259 branch December 12, 2022 12:54
DaveCTurner added a commit that referenced this pull request Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport :Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. v8.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants