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

Fix data race in account grouping for account based migration #5488

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

fxamacker
Copy link
Member

@fxamacker fxamacker commented Mar 1, 2024

Closes #5485
Updates onflow/cadence#3096

This fixes data race in account grouping.

While at it, also added test to reproduce the data race.

@codecov-commenter
Copy link

codecov-commenter commented Mar 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.02%. Comparing base (1726b7b) to head (4621fd8).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5488      +/-   ##
==========================================
+ Coverage   55.97%   56.02%   +0.05%     
==========================================
  Files        1022     1029       +7     
  Lines       99705   100434     +729     
==========================================
+ Hits        55807    56267     +460     
- Misses      39598    39836     +238     
- Partials     4300     4331      +31     
Flag Coverage Δ
unittests 56.02% <100.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@fxamacker fxamacker requested a review from a team March 1, 2024 01:43
@fxamacker fxamacker changed the title Fix data race in account grouping Fix data race in account grouping for account based migration Mar 1, 2024
Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

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

👏

@fxamacker fxamacker enabled auto-merge March 1, 2024 02:00
@@ -177,17 +177,17 @@ func (s sortablePayloads) Swap(i, j int) {
s[i], s[j] = s[j], s[i]
}

func (s sortablePayloads) FindNextKeyIndex(i int) int {
func (s sortablePayloads) FindNextKeyIndexUntil(i int, upperBound int) int {
Copy link
Contributor

Choose a reason for hiding this comment

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

ah, I see, Good catch!

@fxamacker fxamacker added this pull request to the merge queue Mar 1, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Mar 1, 2024
@fxamacker fxamacker added this pull request to the merge queue Mar 1, 2024
Merged via the queue into master with commit 5dcab61 Mar 1, 2024
51 checks passed
@fxamacker fxamacker deleted the fxamacker/fix-payload-grouping-data-race branch March 1, 2024 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Payload grouping has data races
4 participants