Commit 04e7987
committed
rebalancer: refactoring of rebalancer_request_state
Before this patch the function `rebalancer_request_state` returned only
nil in case of errors (e.g. presence of SENDING, RECEIVING, GARBAGE
buckets, not active rebalancer). This makes it inconsistent compared to
other rebalancer functions.
Now, in case of errors we return `(nil, err)` instead of `nil`. It can
help us to propagate a meaningful error in rebalancer service.
NO_TEST=refactoring
NO_DOC=refactoring1 parent 06c15b0 commit 04e7987
File tree
5 files changed
+35
-20
lines changed- test
- rebalancer
- unit
- vshard/storage
5 files changed
+35
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | 321 | | |
325 | 322 | | |
326 | 323 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
160 | 159 | | |
161 | 160 | | |
162 | 161 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
293 | | - | |
294 | | - | |
295 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
296 | 300 | | |
297 | 301 | | |
298 | 302 | | |
| |||
318 | 322 | | |
319 | 323 | | |
320 | 324 | | |
| 325 | + | |
321 | 326 | | |
322 | 327 | | |
323 | 328 | | |
324 | 329 | | |
325 | 330 | | |
326 | | - | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
327 | 335 | | |
| 336 | + | |
328 | 337 | | |
329 | 338 | | |
330 | 339 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
80 | 86 | | |
81 | 87 | | |
82 | 88 | | |
| |||
86 | 92 | | |
87 | 93 | | |
88 | 94 | | |
89 | | - | |
| 95 | + | |
| 96 | + | |
90 | 97 | | |
91 | 98 | | |
92 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2851 | 2851 | | |
2852 | 2852 | | |
2853 | 2853 | | |
2854 | | - | |
2855 | | - | |
2856 | | - | |
2857 | | - | |
2858 | | - | |
2859 | | - | |
| 2854 | + | |
| 2855 | + | |
| 2856 | + | |
| 2857 | + | |
2860 | 2858 | | |
2861 | 2859 | | |
2862 | 2860 | | |
| |||
2945 | 2943 | | |
2946 | 2944 | | |
2947 | 2945 | | |
2948 | | - | |
| 2946 | + | |
2949 | 2947 | | |
2950 | 2948 | | |
2951 | 2949 | | |
| 2950 | + | |
| 2951 | + | |
2952 | 2952 | | |
2953 | | - | |
| 2953 | + | |
| 2954 | + | |
2954 | 2955 | | |
2955 | 2956 | | |
2956 | | - | |
| 2957 | + | |
| 2958 | + | |
2957 | 2959 | | |
2958 | 2960 | | |
2959 | | - | |
| 2961 | + | |
| 2962 | + | |
2960 | 2963 | | |
2961 | 2964 | | |
2962 | 2965 | | |
| |||
0 commit comments