Commit df99171
Refactor: Simplify KVBucket::getRandomKey
There was a bug in KBBucket::getRandomKey - see MB-31495, which
although has been fixed highlighted unnecessary complexity in the
implementation of the function.
This patch simplfies the implementation of the function by removing
the nested while loops.
Change-Id: I614ef388abecf90992df31fbbd06d1b6ead5477e
Reviewed-on: http://review.couchbase.org/100397
Tested-by: Build Bot <[email protected]>
Reviewed-by: Paolo Cocchi <[email protected]>1 parent c176cda commit df99171
1 file changed
+3
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1413 | 1413 | | |
1414 | 1414 | | |
1415 | 1415 | | |
1416 | | - | |
1417 | | - | |
1418 | | - | |
1419 | | - | |
1420 | | - | |
1421 | | - | |
1422 | | - | |
1423 | | - | |
1424 | | - | |
1425 | | - | |
1426 | | - | |
1427 | | - | |
| 1416 | + | |
| 1417 | + | |
1428 | 1418 | | |
1429 | 1419 | | |
1430 | 1420 | | |
1431 | 1421 | | |
1432 | 1422 | | |
1433 | 1423 | | |
1434 | 1424 | | |
1435 | | - | |
1436 | 1425 | | |
1437 | | - | |
| 1426 | + | |
1438 | 1427 | | |
1439 | 1428 | | |
1440 | 1429 | | |
| |||
0 commit comments