Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-12767

Deprecate min_rf parameter and always include the achieved rf in the response

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.6
    • Component/s: None
    • Labels:
      None

      Description

      Currently the min_rf parameter does two things.
      1. It tells Solr that the user wants to keep track of the achieved replication factor
      2. (undocumented AFAICT) It prevents Solr from putting replicas in recovery if the achieved replication factor is lower than the min_rf specified

      #2 is intentional and I believe the reason behind it is to prevent replicas to go into recovery in cases of short hiccups (since the assumption is that the user is going to retry the request anyway). This is dangerous because if the user doesn’t retry (or retries a number of times but keeps failing) the replicas will be permanently inconsistent. Also, since we now retry updates from leaders to replicas, this behavior has less value, since short temporary blips should be recovered by those retries anyway.

      I think we should remove the behavior described in #2, #1 is still valuable, but there isn’t much point of making the parameter an integer, the user is just telling Solr that they want the achieved replication factor, so it could be a boolean, but I’m thinking we probably don’t even want to expose the parameter, and just always keep track of it, and include it in the response. It’s not costly to calculate, so why keep two separate code paths?

        Attachments

        1. SOLR-12767.patch
          21 kB
          Tomás Fernández Löbbe
        2. SOLR-12767.patch
          22 kB
          Tomás Fernández Löbbe
        3. SOLR-12767.patch
          23 kB
          Tomás Fernández Löbbe
        4. SOLR-12767.patch
          34 kB
          Tomás Fernández Löbbe
        5. SOLR-12767.patch
          35 kB
          Tomás Fernández Löbbe
        6. SOLR-12767.patch
          36 kB
          Tomás Fernández Löbbe

          Issue Links

            Activity

              People

              • Assignee:
                tomasflobbe Tomás Fernández Löbbe
                Reporter:
                tomasflobbe Tomás Fernández Löbbe
              • Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: