Commit ef25a62
authored
[Bug Fix][KeySharedPolicy] Fixed bug where KeySharedPolicy::setStickyRanges duplicated ranges. (#242)
* *[fix] Fixed bug where KeySharedPolicy::setStickyRanges appended duplicate ranges to KeySharedPolicy->ranges. The for loop was nested when it shouldn't have been nested.
*Added overloaded KeySharedPolicy::setStickyRanges function that takes the StickyRanges vector. This is convenient in case a developer wants to provide a vector. It is also required for adding KeySharedPolicy to the python pulsar client which uses pybind11. std::initializer_list type conversion is not supported with pybind11. See pybind/pybind11#1302 (comment)
*Added a test that checks to see if the KeySharedPolicy->ranges variable is set as expected after calling KeySharedPolicy::setStickyRanges
*Added a test that checks to see if the KeySharedPolicy->ranges variable is the same when using the two different overloaded KeySharedPolicy::setStickyRanges functions.
* Fixed format. Added depreciated comment. Passed StickRanges as reference. Implicit conversion from std::initializer_list to std::vector
* Removed type1 parent 058d099 commit ef25a62
File tree
3 files changed
+35
-4
lines changed- include/pulsar
- lib
- tests
3 files changed
+35
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
101 | 107 | | |
102 | 108 | | |
103 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
55 | 59 | | |
56 | 60 | | |
57 | 61 | | |
| |||
65 | 69 | | |
66 | 70 | | |
67 | 71 | | |
68 | | - | |
69 | | - | |
70 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
71 | 75 | | |
72 | 76 | | |
73 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
0 commit comments