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

fixed serialization of mixed failed and successful heartbeat replies #8781

Merged
merged 2 commits into from
Feb 13, 2023

Conversation

mmaslankaprv
Copy link
Member

@mmaslankaprv mmaslankaprv commented Feb 10, 2023

When there was one failed heartbeat reply in the array of heartbeat
replies it might cause all other heartbeats to fail as the not
initialized field for target node_id was used for all of the heartbeat
replies. Heartbeat reply serialization uses a varint delta encoding to
minimize the size of exchanged messages and de-duplicate information.
Changed the way how the target_node_id field is selected for
serialization. Instead of using just a first node we will use last one
after the array of responses is sorted for delta encoding. After sort
operation the largest value of last_flushed_offset is at the end of
the array as not initialized value is a model::offset::min() if there
is any other value available it will reside at the end of the array
after the sort.

Backports Required

  • none - not a bug fix
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v22.3.x
  • v22.2.x
  • v22.1.x

UX Changes

Release Notes

Bug Fixes

  • Fixed issue that may caused heartbeats to be missed in loaded clusters

jcsp
jcsp previously approved these changes Feb 10, 2023
When there was one failed heartbeat reply in the array of heartbeat
replies it might cause all other heartbeats to fail as the not
initialized field for target node_id was used for all of the heartbeat
replies. Heartbeat reply serialization uses a varint delta encoding to
minimize the size of exchanged messages and de-duplicate information.
Changed the way how the target_node_id field is selected for
serialization. Instead of using just a first node we will use last one
after the array of responses is sorted for delta encoding. After sort
operation the largest value of `last_flushed_offset` is at the end of
the array as not initialized value is a `model::offset::min()` if there
is any other value available it will reside at the end of the array
after the sort.

Fixes: redpanda-data#8733

Signed-off-by: Michal Maslanka <michal@redpanda.com>
Signed-off-by: Michal Maslanka <michal@redpanda.com>
@mmaslankaprv mmaslankaprv merged commit 703628b into redpanda-data:dev Feb 13, 2023
@vshtokman
Copy link
Contributor

/backport v22.3.x

@vshtokman
Copy link
Contributor

/backport v22.2.x

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

Successfully merging this pull request may close these issues.

None yet

4 participants