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

mempool: reduce lock contention #152

Merged
merged 1 commit into from
May 5, 2016
Merged

Conversation

alexlyp
Copy link
Member

@alexlyp alexlyp commented May 4, 2016

Recreated 907152c commit from btcd

Previously mp.lastUpdated = time.Now() needed to be locked for access. With the use of atomic.StoreInt64, it allows us to remove the now unneeded lock in LastUpdated which can run without racing in mempool.

@davecgh
Copy link
Member

davecgh commented May 4, 2016

Can we make the title and description of the commit the same as upstream and just add the commit which it was derived from to the description? "Recreated 907..." doesn't really let anyone know what the purpose of this commit is without having to go dig through btcsuite/btcd as well.

@alexlyp
Copy link
Member Author

alexlyp commented May 4, 2016

good point. i'll do so now

@alexlyp alexlyp changed the title Recreated 907152cef9714be35f6e32352268a23dc76bdb9c commit from btcd mempool: reduce lock contention May 5, 2016
@cjepson
Copy link
Contributor

cjepson commented May 5, 2016

Please make the description of the commit reflect the problem and changes

Previously mp.lastUpdated = time.Now() needed a lock for acess.  With
the use of atomic.StoreInt64, it allows us to remove the lock in
LastUpdated which now can be run in mempool.

Recreated 907152c commit from btcd
@alexlyp alexlyp merged commit e33e2b9 into decred:master May 5, 2016
@alexlyp alexlyp deleted the ayp_chery branch May 24, 2016 20:24
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.

3 participants