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

Create mechanism for pinning the oldest timestamp

    • Fully Compatible
    • Sharding 2020-12-28

      Currently the oldest timestamp lags the stable timestamp by some window to allow for:

      • sharded transactions at snapshot isolation to target new shards that contain the necessary data.
      • replica set transactions that can query for data across different nodes in the replica set.

      But there are other actors in the system that would like to read historical data. Two examples include (background) collection validation and resharding.

      This ticket is to provide a mechanism where additional actors can request the oldest timestamp be pinned. Once pinned, an actor can choose to advance its request, or it can completely release its hold on the oldest timestamp.

      The oldest timestamp would be calculated as the minimum of the default setting and all the requested pinned timestamps.

      Additionally (but maybe for another ticket) there should be a way to ensure an oldest timestamp is pinned across a restart (perhaps not useful for background validation, but necessary for resharding). This presumably means that at startup, there's a startup recovery window/stage where these external actors can re-register an oldest timestamp request before the system kicks in and starts naturally advancing it. It may make sense though to spin off a different ticket to actually have resharding hook into this window.

            daniel.gottlieb@mongodb.com Daniel Gottlieb (Inactive)
            daniel.gottlieb@mongodb.com Daniel Gottlieb (Inactive)
            0 Vote for this issue
            5 Start watching this issue