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

read CommitInfo before overwriting it with stale data #9892

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

jrockway
Copy link
Member

@jrockway jrockway commented Mar 26, 2024

Refresh CommitInfo before overwriting it. This avoids a rare race:

A commit is created.
Finalization starts.
Metadata on the commit is changed.
The metadata update is overwritten when the PFS master writes the finalization time / status to the commit.

The metadata tests are fast enough to cause this, and it happened pretty consistently.

This probably needs to be done in more places; we should always read before writing when only changing one field.

@jrockway jrockway force-pushed the jonathan/testpachd-with-pfs-master-txn-fix branch from 97c45d7 to 03f5558 Compare March 26, 2024 22:19
@jrockway jrockway marked this pull request as ready for review March 26, 2024 22:23
@jrockway jrockway requested a review from a team as a code owner March 26, 2024 22:23
Copy link

codecov bot commented Mar 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.22%. Comparing base (e244f49) to head (678bc2d).
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9892      +/-   ##
==========================================
- Coverage   58.32%   58.22%   -0.10%     
==========================================
  Files         604      604              
  Lines       73186    73188       +2     
==========================================
- Hits        42683    42614      -69     
- Misses      29958    30033      +75     
+ Partials      545      541       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jrockway jrockway force-pushed the jonathan/testpachd-with-pfs-master-txn-fix branch from 03f5558 to 678bc2d Compare March 27, 2024 00:23
@jrockway jrockway changed the base branch from jonathan/runnable-testpachd to master March 27, 2024 00:23
Copy link
Contributor

@brendoncarroll brendoncarroll left a comment

Choose a reason for hiding this comment

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

LGTM

@jrockway jrockway merged commit 4e9b79a into master Mar 28, 2024
21 checks passed
zmajeed pushed a commit that referenced this pull request Apr 2, 2024
Refresh CommitInfo before overwriting it.  This avoids a rare race:

A commit is created.
Finalization starts.
Metadata on the commit is changed.
The metadata update is overwritten when the PFS master writes the
finalization time / status to the commit.

The metadata tests are fast enough to cause this, and it happened pretty
consistently.

This probably needs to be done in more places; we should always read
before writing when only changing one field.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants