Commit fe15245
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 fe15245
File tree
5 files changed
+35
-18
lines changed- test
- rebalancer
- unit
- vshard/storage
5 files changed
+35
-18
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 | | |
327 | 332 | | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
328 | 340 | | |
329 | 341 | | |
330 | 342 | | |
| |||
| 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 | | |
| |||
| 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