berty / go-orbit-db

Go version of P2P Database on IPFS
https://berty.tech
Apache License 2.0
422 stars 57 forks source link

fix: losing events due to late subcribe in go routine #65

Closed phanhuynhquy closed 4 years ago

phanhuynhquy commented 4 years ago

[Change Description]

Due we create subscribe channel inside go routine. So in case of delay in schedule the routine get started later , we will lost some events. . That is why we have several inconsistency tests. Solution : create subscribe channel before fork go routine.

[Ticket]

None

[Test]

Run replicate tests many times

[CheckList]

None

codecov[bot] commented 4 years ago

Codecov Report

Merging #65 into master will decrease coverage by 0.19%. The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #65      +/-   ##
==========================================
- Coverage   68.06%   67.87%   -0.20%     
==========================================
  Files          29       29              
  Lines        2402     2406       +4     
==========================================
- Hits         1635     1633       -2     
- Misses        552      557       +5     
- Partials      215      216       +1     
Flag Coverage Δ
#unittests 67.87% <75.00%> (-0.20%) :arrow_down:

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

Impacted Files Coverage Δ
...cesscontroller/orbitdb/accesscontroller_orbitdb.go 3.57% <0.00%> (-0.03%) :arrow_down:
baseorbitdb/orbitdb.go 71.57% <100.00%> (+0.11%) :arrow_up:
stores/basestore/base_store.go 64.56% <100.00%> (+0.08%) :arrow_up:
pubsub/directchannel/channel.go 79.09% <0.00%> (-4.55%) :arrow_down:

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 5ecf08d...5d36e5f. Read the comment docs.

github-actions[bot] commented 4 years ago

:tada: This PR is included in version 1.10.5 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: