Commit 121cf99
committed
FAB-1723 Fix peers filtering for gossip push/pull
File gossip/filter/filter.go
Method SelectPeer - in case of small k, log(membership) for example,
and many small channels in most cases it will return empty list -
as first step it choose k peers from membership and only after that
filter them, as result it will remain with zero peers
Correct way to implement it is filter peers first and only after that
choose k peers from filtered list.
Change-Id: I1577df37cc8441adf7e96a0e847dc901afd60ea8
Signed-off-by: Gennady Laventman <gennady@il.ibm.com>1 parent 48d8df9 commit 121cf99
1 file changed
+13
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
44 | 51 | | |
45 | | - | |
46 | | - | |
47 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
48 | 55 | | |
49 | 56 | | |
50 | 57 | | |
51 | | - | |
| 58 | + | |
52 | 59 | | |
53 | 60 | | |
54 | 61 | | |
55 | 62 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
| 63 | + | |
61 | 64 | | |
| 65 | + | |
62 | 66 | | |
63 | 67 | | |
0 commit comments