[SERVER-66563] prepareUnique: true should not change the index spec when the index is already unique Created: 18/May/22 Updated: 29/Oct/23 Resolved: 06/Jun/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Wenbin Zhu | Assignee: | Yuhong Zhang |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Execution Team 2022-06-13 |
| Participants: |
| Description |
|
Currently if you call prepareUnique: true on a unique index, the index spec will still be changed, which is kind of confusing:
It seems prepareUnique: true should just be a noop on a unique index, and not change the index spec. |
| Comments |
| Comment by Githook User [ 03/Jun/22 ] |
|
Author: {'name': 'Yuhong Zhang', 'email': 'yuhong.zhang@mongodb.com', 'username': 'YuhongZhang98'}Message: |
| Comment by Yuhong Zhang [ 02/Jun/22 ] |
|
The issue should have been fixed in commit fcb9d766b6f66e6a9cfabe1795c1e9d43465b151 which was merged in 6.0.0-rc0 and 6.1.0-rc0. I'll add some jstests using this ticket. |
| Comment by Wenbin Zhu [ 18/May/22 ] |
|
cc pavithra.vetriselvan@mongodb.com lingzhi.deng@mongodb.com m.maher@mongodb.com This is not urgent, but nice if is fixed. |