Skip to content

v1.18: fix race condition on vote count (backport of #1762)#1838

Closed
mergify[bot] wants to merge 1 commit intov1.18from
mergify/bp/v1.18/pr-1762
Closed

v1.18: fix race condition on vote count (backport of #1762)#1838
mergify[bot] wants to merge 1 commit intov1.18from
mergify/bp/v1.18/pr-1762

Conversation

@mergify
Copy link
Copy Markdown

@mergify mergify Bot commented Jun 24, 2024

Problem

  • There's a race condition in update_latest_vote in updating the count.

Example Timeline:
thread1: get_entry, doesn't exist.
thread2: insert's new entry. increments count.
thread1: overwrites entry. increments count.

Summary of Changes

  • Run same checks after inserting entry since we dropped locks.

Fixes #


This is an automatic backport of pull request #1762 done by [Mergify](https://mergify.com).

(cherry picked from commit d06a3ac)

# Conflicts:
#	core/src/banking_stage/latest_unprocessed_votes.rs
@mergify mergify Bot added the conflicts label Jun 24, 2024
@mergify mergify Bot requested a review from a team as a code owner June 24, 2024 14:21
@mergify
Copy link
Copy Markdown
Author

mergify Bot commented Jun 24, 2024

Cherry-pick of d06a3ac has failed:

On branch mergify/bp/v1.18/pr-1762
Your branch is up to date with 'origin/v1.18'.

You are currently cherry-picking commit d06a3aceb2.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   core/src/banking_stage/latest_unprocessed_votes.rs

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@willhickey
Copy link
Copy Markdown

Closing this as stale. If you think this is relevant please re-open and let @anza-xyz/backport-reviewers know why it is important

@willhickey willhickey closed this Sep 4, 2024
@mergify mergify Bot deleted the mergify/bp/v1.18/pr-1762 branch September 4, 2024 16:23
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.

2 participants