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

use copy method instead of direct assignment to avoid lock copy #189 #193

Merged
merged 2 commits into from
Apr 27, 2021

Conversation

bbist
Copy link
Contributor

@bbist bbist commented Apr 19, 2021

Issue: #189

@guruhubb guruhubb requested a review from peterlimg April 19, 2021 08:39
@bbist
Copy link
Contributor Author

bbist commented Apr 19, 2021

I'll fix the failing unit tests from other packages and let you know.

@bbist
Copy link
Contributor Author

bbist commented Apr 19, 2021

I'll fix the failing unit tests from other packages and let you know.

Test is passing locally.

$ go test -timeout 30s -run "^TestChain_GetBlockBySummary$" 0chain.net/sharder
ok      0chain.net/sharder      0.078s

@bbist
Copy link
Contributor Author

bbist commented Apr 19, 2021

Actually, using lock in Info struct doesn't seem to make sense anyway. Maybe we should completely do away with the mutex @peterlimg ? Also, if mutex was meant to be shared, it should have used reference to a mutex.

@guruhubb guruhubb requested review from Sriep and removed request for peterlimg April 26, 2021 01:07
@Sriep Sriep merged commit eecd7c2 into master Apr 27, 2021
@Sriep Sriep deleted the avoid-lock-copy branch April 27, 2021 12:26
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