Skip to content

filesystem_prefetch_max_memory_usage can't be zero #54008

Closed

Description

@Algunenano

filesystem_prefetch_max_memory_usage documentation under Settings.h says:

    M(UInt64, filesystem_prefetch_max_memory_usage, "1Gi", "Maximum memory usage for prefetches. Zero means unlimited", 0) \

But when you try to set it to 0 to allow unlimited memory you get an exception:

Code: 36. DB::Exception: Received from localhost:9000. DB::Exception: Setting `filesystem_prefetch_max_memory_usage` must be non-zero. (BAD_ARGUMENTS)

This was changed in #48973 cc @kssenii

Should 0 be allowed and be unlimited? The code under the condition seems to check if it's or not zero, so it seems like it, but maybe there is a reason this was disallowed when testing random settings.

Activity

  1. added
    comp-documentation
    on Aug 29, 2023
  2. kssenii commented on Aug 29, 2023

    @kssenii
    Member

    Should 0 be allowed and be unlimited? The code under the condition seems to check if it's or not zero, so it seems like it, but maybe there is a reason this was disallowed when testing random settings.

    I thought that it is better not to allow that as otherwise it can very easily result in OOM.

  3. alexey-milovidov commented on Aug 29, 2023

    @alexey-milovidov
    Member

    Ok, let's fix the embedded docs then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    comp-documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions