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

[v22.2.x] fixed serialization of mixed failed and successful heartbeat replies #8913

Merged

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #8781

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>
(cherry picked from commit e89d69a)
Signed-off-by: Michal Maslanka <michal@redpanda.com>
(cherry picked from commit c294827)
@vbotbuildovich vbotbuildovich added this to the v22.2.x-next milestone Feb 15, 2023
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Feb 15, 2023
@VadimPlh VadimPlh marked this pull request as ready for review March 10, 2023 09:08
@VadimPlh
Copy link
Contributor

@VadimPlh VadimPlh merged commit 04f4410 into redpanda-data:v22.2.x Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants