[SERVER-76264] Prevent segfaults over uninitialized OptionalRoutingTableHistory Created: 18/Apr/23 Updated: 29/Oct/23 Resolved: 04/Jul/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.1.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Fausto Leyva (Inactive) | Assignee: | Pol Pinol |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | shardingemea-qw | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Sharding EMEA
|
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Sharding EMEA 2023-07-10 |
| Participants: | |
| Story Points: | 1 |
| Description |
|
The "OptionalRoutingTableHistory" can be a nullptr for unsharded collections inside of the ChunkManager->_rt. Could we add a more robust method of preventing callers from accidentally calling methods on an unsharded collection? Perhaps invarianting on isSharded() prior to executing the methods that require that to be true. I would prefer that over seg-faulting. Currently, the only safe-guard against this is a small comment in the header file: |
| Comments |
| Comment by Githook User [ 04/Jul/23 ] |
|
Author: {'name': 'Pol Pinol Castuera', 'email': 'pol.pinol@mongodb.com', 'username': 'PolPinol'}Message: |