8000 networkdb: Use write lock in handleNodeEvent by cpuguy83 · Pull Request #2136 · moby/libnetwork · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@cpuguy83
Copy link
Member
@cpuguy83 cpuguy83 commented Apr 12, 2018

handleNodeEvent is calling changeNodeState which writes to various
maps on the ndb object.
Using a write lock prevents a panic on concurrent read/write access on
these maps.

Related to moby/moby#36814

`handleNodeEvent` is calling `changeNodeState` which writes to various
maps on the ndb object.
Using a write lock prevents a panic on concurrent read/write access on
these maps.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Copy link
@fcrisciani fcrisciani left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov-io
8000
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@6d13832). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2136   +/-   ##
=========================================
  Coverage          ?   40.46%           
=========================================
  Files             ?      139           
  Lines             ?    22472           
  Branches          ?        0           
=========================================
  Hits              ?     9093           
  Misses            ?    12040           
  Partials          ?     1339
Impacted Files Coverage Δ
networkdb/delegate.go 74.35% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6d13832...48b3773. Read the comment docs.

Copy link
Contributor
@ddebroy ddebroy left a comment

Choose a reason for hiding this comment

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

LGTM

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.

5 participants

0