Skip to content

fix minor data race in bitswap - #1281

Merged
jbenet merged 1 commit into
masterfrom
fix/bs-race
May 22, 2015
Merged

fix minor data race in bitswap#1281
jbenet merged 1 commit into
masterfrom
fix/bs-race

Conversation

@whyrusleeping

Copy link
Copy Markdown
Member

No description provided.

@whyrusleeping whyrusleeping added the status/in-progress In progress label May 22, 2015
@whyrusleeping

Copy link
Copy Markdown
Member Author

addresses #1280

Comment thread exchange/bitswap/bitswap.go Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

maybe:

blocksRecvd := bs.blocksRecvd
dupBlocksRecvd := bs.dupBlocksRecvd
bs.counterLk.Unlock()
log.Infof("got block %s from %s (%d,%d)", block, p, blocksRecvd, dupBlocksRecvd)

?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yeah, that works too, avoids waiting on io inside a contentious area

jbenet added a commit that referenced this pull request May 22, 2015
fix minor data race in bitswap
@jbenet
jbenet merged commit 0d1072a into master May 22, 2015
@jbenet jbenet removed the status/in-progress In progress label May 22, 2015
@jbenet
jbenet deleted the fix/bs-race branch May 22, 2015 21:30
@wking wking mentioned this pull request Jun 12, 2015
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.

2 participants