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

Review the metrics API to ensure consistent placeholders for missing values

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 8.8
    • metrics
    • None

    Description

      Spin-off from SOLR-14657. Some gauges can legitimately be missing or in an unknown state at some points in time, eg. during SolrCore startup or shutdown.

      Currently the API returns placeholders with either impossible values for numeric gauges (such as index size -1) or empty maps / strings for other non-numeric gauges.

      hossman noticed that the values for these placeholders may be misleading, depending on how the user treats them - if the client has no special logic to treat them as "missing values" it may erroneously treat them as valid data. E.g. numeric values of -1 or 0 may severely skew averages and produce misleading peaks / valleys in metrics histories.

      On the other hand returning a literal null value instead of the expected number may also cause unexpected client issues - although in this case it's clearer that there's actually no data available, so long-term this may be a better strategy than returning impossible values, even if it means that the client should learn to handle null values appropriately.

      Attachments

        1. SOLR-14683.patch
          22 kB
          Andrzej Bialecki
        2. SOLR-14683.patch
          13 kB
          Andrzej Bialecki

        Activity

          People

            ab Andrzej Bialecki
            ab Andrzej Bialecki
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: