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

Allow to disable secondaries when they are behinded for a long time.

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 2.2.3
    • Fix Version/s: None
    • Component/s: Replication
    • Labels:
      None
    • Environment:
      Linux

      Description

      I deployed a sharding cluster with 4 replica sets. Each rs contains a primary and a secondary and an arbiter. I insert data into primary and make queries on secondaries by using read preferrence "SecondaryPreferred".
      However, in some circumstance´╝îmy secondaries lag behind for a long time(eg. serveral hours) because of heavy load or hardware maintenance. In this circumstance, I actually don't want my app to read data from secondries becuse data in them are quite old. I prefer them to read from primary instead.

      So. Is it possible to add a config to specify a value, when the secondary find that it's
      behind more than this time span, it will turn to a "CATCH UP" status so that it's not a valid node temporary. And then "SecondaryPreferred" reads will be routed to primaries.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              strlee stronglee
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: