Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-48475

Secondary reads always calculate all_durable despite only using lastApplied

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.4.0-rc9, 4.7.0
    • Affects Version/s: 4.5.1, 4.4.0-rc7
    • Component/s: None
    • Fully Compatible
    • v4.4
    • Execution Team 2020-06-15
    • 0

      As of SERVER-46721, reads on secondaries used the no-overlap point, which is computed as the minimum of replication's lastApplied and WT's all_durable timestamps.

      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.

            Assignee:
            louis.williams@mongodb.com Louis Williams
            Reporter:
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: