[SERVER-48475] Secondary reads always calculate all_durable despite only using lastApplied Created: 28/May/20 Updated: 29/Oct/23 Resolved: 05/Jun/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 4.5.1, 4.4.0-rc7 |
| Fix Version/s: | 4.4.0-rc9, 4.7.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Louis Williams | Assignee: | Louis Williams |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | bkp | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Backport Requested: |
v4.4
|
||||||||||||||||||||
| Sprint: | Execution Team 2020-06-15 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||||||
| Description |
|
As of On secondaries, lastApplied is only updated at replication batch boundaries, and all_durable may advance as we apply oplog entries out of order. Because we take the minimum value, the no-overlap point is always equal to lastApplied. Reads on secondaries will perform unnecessary queries for all_durable. This value is not cached, and requires taking a read lock in WT to traverse a queue of commit timestamps. We can regain some performance for reads by only using lastApplied on secondaries. |
| Comments |
| Comment by Githook User [ 06/Aug/20 ] |
|
Author: {'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}Message: The no-overlap time, ReadSource::kNoOverlap, is the minimum of replication's lastApplied timestamp (cherry picked from commit 25c694f365db0f07a445bd17b6cd5cbf32f5f2f9)
After yielding and reacquiring locks in a query, the preconditions that were used to select our (cherry picked from commit b3a5b5258a487006f0487b9e7e0a1d0d4f1119ff)
This partially reverts work to use the kNoOverlap ReadSource on secondaries since the all_durable (cherry picked from commit ff92d4435fa75c2b947c49cffaf48805b320a5ae) |
| Comment by Githook User [ 05/Jun/20 ] |
|
Author: {'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}Message: This partially reverts work to use the kNoOverlap ReadSource on (cherry picked from commit ff92d4435fa75c2b947c49cffaf48805b320a5ae) |
| Comment by Githook User [ 05/Jun/20 ] |
|
Author: {'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}Message: This partially reverts work to use the kNoOverlap ReadSource on |