[SERVER-13115] Delete operations should parse queries without holding locks, when possible. Created: 10/Mar/14 Updated: 11/Jul/16 Resolved: 12/Mar/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Write Ops |
| Affects Version/s: | 2.6.0-rc1 |
| Fix Version/s: | 2.6.0-rc2 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Andy Schwerin | Assignee: | Andy Schwerin |
| Resolution: | Done | Votes: | 0 |
| Labels: | 26qa | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Description |
|
In The same optimization could be applied to the delete path in a straightforward way. See the implementation of the UpdateExecutor and its use in the BatchWriteExecutor for example. |
| Comments |
| Comment by Githook User [ 12/Mar/14 ] | |||||||||||||
|
Author: {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}Message: | |||||||||||||
| Comment by Githook User [ 12/Mar/14 ] | |||||||||||||
|
Author: {u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}Message: Follows the pattern of the UpdateExecutor. Applies the optimization to legacy | |||||||||||||
| Comment by Githook User [ 12/Mar/14 ] | |||||||||||||
|
Author: {u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}Message: This method is useful outside of the update code where it was originally | |||||||||||||
| Comment by Andy Schwerin [ 11/Mar/14 ] | |||||||||||||
|
I've revised this ticket to only focus on the delete path, from which the sysbench benchmark saw performance improvements. Applying the optimization meaningfully to the find path is less straightforward, because the power of the optimization comes in part from not generating a CanonicalQuery at all when it is unnecessary. That is not a simple change to the find path. | |||||||||||||
| Comment by Andy Schwerin [ 10/Mar/14 ] | |||||||||||||
|
And what do you see for 2.4.9? There's a lot of variability per host, I've noticed. | |||||||||||||
| Comment by Davide Italiano [ 10/Mar/14 ] | |||||||||||||
|
Just to play devil's advocate, I'm not completely sure moving out of the lock scope the canonicalization step for find operations will buy as a lot, at least not in the 'sysbench-like' workload proposed in Canonicalization out of the lock scope:
Canonicalization under lock scope
| |||||||||||||
| Comment by Alvin Richards (Inactive) [ 10/Mar/14 ] | |||||||||||||
|
Attached is an analysis from the logs of running a workload on 2.4.9 and RC1. There is a clear difference in the duration of the lock during remove (the blue dots) in RC1, so this would support the case that the optimization in update could be relevant to remove as well. |