[SERVER-80596] Avoid useless initial iteration in ChunkMap chunks loops Created: 31/Aug/23 Updated: 29/Oct/23 Resolved: 06/Sep/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 7.1.0-rc0 |
| Fix Version/s: | 7.2.0-rc0, 7.1.0-rc2 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Tommaso Tocci | Assignee: | Tommaso Tocci |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Backport Requested: |
v7.1
|
||||||||||||
| Sprint: | Sharding EMEA 2023-09-04, Sharding EMEA 2023-09-18 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
Here and here we use lower_bound instead of upper_bound to find the vector that contain the first chunk of the loop. The consequence is that when the start shard key is equal to the minKey of the first chunk of a vector, we will wrongly start iterating from the previous vector instead of the correct one. This does not actually cause any correctness issue because in both cases the logic afterward will simply skip the initial wrong vector because it doesn't actually contain the initial shard Key. |
| Comments |
| Comment by Githook User [ 06/Sep/23 ] |
|
Author: {'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}Message: (cherry picked from commit da03e4fb0c8b00702ca51606b54b39df504fc598) |
| Comment by Githook User [ 06/Sep/23 ] |
|
Author: {'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}Message: |