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

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

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

      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.

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

              Created:
              Updated:
              Resolved: