[SERVER-36961] createIndexes command should check if index already exists with weak lock Created: 31/Aug/18 Updated: 29/Oct/23 Resolved: 18/Sep/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | None |
| Fix Version/s: | 3.6.9, 4.0.3, 4.1.4 |
| Type: | Improvement | Priority: | Critical - P2 |
| Reporter: | Asya Kamsky | Assignee: | Louis Williams |
| 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: |
v4.0, v3.6
|
||||||||||||||||||||||||
| Sprint: | Storage NYC 2018-09-24 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Linked BF Score: | 8 | ||||||||||||||||||||||||
| Description |
|
Currently createIndexes command takes the locks it needs to actual create an index. If the index already exists (as is the case in a lot of scenarios where "just in case" createIndex is sent periodically or before running some process) concurrency could benefit significantly from checking if the index already exists under a weak lock. This would benefit cases where the index exists as is (success returned) or the index exists but with different options (failure returned) - neither of these would contribute to command requiring a strong lock. |
| Comments |
| Comment by Githook User [ 10/Oct/18 ] |
|
Author: {'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}Message: (cherry picked from commit 44c1dcf0e962bda6c37c02c9e8bebcc4fa6e447e) |
| Comment by Eric Milkie [ 09/Oct/18 ] |
|
It looks like the backport will be clean so I'll approve it. |
| Comment by Blake Oler [ 05/Oct/18 ] |
|
Requesting a 3.6 backport via JIRA. This should be treated with the same priority as the original ticket so that the LogicalSessionCache can be stabilized on 3.6. CC milkie |
| Comment by Blake Oler [ 03/Oct/18 ] |
|
It'd be great if we could backport this to 3.6. That would help us prevent lock timeout issues in the LogicalSessionCache. Is this possible louis.williams? |
| Comment by Githook User [ 21/Sep/18 ] |
|
Author: {'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}Message: (cherry picked from commit 44c1dcf0e962bda6c37c02c9e8bebcc4fa6e447e) |
| Comment by Githook User [ 18/Sep/18 ] |
|
Author: {'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}Message: |