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

Various rate limiting fixes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 9.7
    • None
    • None

    Description

      Solr rate limiting (introduced with SOLR-13528) has a number of issues with its current implementation:

      1. live-update via clusterprops is incomplete, and does not work. Some settings can be updated, but for others – namely, the actual request limits – attempted changes are silently ignored. (aside from the fact that it doesn't work, the high-level approach to config changes is not ideal, mutating objects in potentially brittle ways)
      2. there is a bug in slot borrowing that can in principle cause slots to be denied to native request types with guaranteed slots, even when plenty of slots are available. More likely consequences of the bug would be: native request types waiting up to twice as long as specified by slot allocation millis before failing to acquire, or pointlessly waiting slot allocation millis even when plenty of slots are available
      3. unnecessary state-tracking of existing requests; we should instead close out rate-limiting slots via try-with-resources. This will be safer, cleaner, more efficient, and support more flexible slot-granting. (currently the outstanding state is tracked in a separate map in the RateLimitManager, which is needlessly complex/inflexible)
      4. refguide documentation is incomplete. Most importantly: ratelimiting won't work at all without the addition of a `Solr-Request-Type` header, but as of current version v.9.6 the refguide documentation doesn't mention the required header, so any user would be thoroughly confused!

      I've bundled these issues together for simplicity; I can break them apart if folks prefer, but the changes are kind of intertwined, and really IMO together constitute a single high-level follow-up to the introduction of rate limiting.

      Attachments

        Issue Links

          Activity

            People

              magibney Michael Gibney
              magibney Michael Gibney
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m