maxLogSizeKB parameter should only be positive

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 3.4.0
    • Component/s: Internal Code, Logging
    • Minor Change
    • Sharding 2018-03-12, Sharding 2019-02-25, Sharding 2019-03-11, Sharding 2019-03-25, Dev Tools 2020-03-09
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      It's currently possible to set the maxLogSizeKB parameter to 0 or a negative value, neither of which make sense.

      The parameter variable itself is a signed int, but gets assigned to a size_t (which is unsigned). But it's not possible to use an unsigned type (see SERVER-27520), so either the allowed values should be restricted to only > 0, or values <= 0 reinterpreted (eg. to mean "default value" of 10 KB).

            Assignee:
            Henrik Edin
            Reporter:
            Kevin Pulo
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: