Skip to content

[Bug] [Config] Inconsistent defaults for storage flood stage thresholds between FE and BE #67934

Description

@simges

Search before asking

  • I had searched in the issues and found no similar issues.

Version

v3.1.4

What's Wrong?

[Config] Inconsistent defaults for storage flood stage thresholds between FE and BE

Description

Apache Doris defines storage_flood_stage_usage_percent and storage_flood_stage_left_capacity_bytes in both FE and BE configuration. The two components use the same parameter names, but the default value of storage_flood_stage_usage_percent is inconsistent.

According to the official documentation:

Parameter | FE default | BE default -- | -- | -- storage_flood_stage_usage_percent | 95 | 90 storage_flood_stage_left_capacity_bytes | 1 GiB | 1 GiB

References:

Problem

### Conflicting Configuration Defaults Between FE and BE

The same configuration parameters have conflicting defaults in FE and BE, which can mislead users when configuring a Doris cluster.

For example, at 92% disk usage:

  • FE: Stays normal (default threshold is 95%).
  • BE: Triggers flood-stage protection and returns errors (default threshold is 90%).

Impact

This mismatch causes unexpected query failures. It makes disk protection behavior unpredictable and complicates both cluster configuration and troubleshooting.

What You Expected?

The default values and descriptions of the corresponding FE and BE parameters should be consistent, or the documentation should clearly explain why they intentionally differ.

How to Reproduce?

  • set config::storage_flood_stage_usage_percent 92% as hard-coded.
  • set storage_flood_stage_left_capacity_bytes to a high value enough for satisy this condition in data_dir.cpp:
bool DataDir::reach_capacity_limit(int64_t incoming_data_size) {
    double used_pct = get_usage(incoming_data_size);
    int64_t left_bytes = _available_bytes - incoming_data_size;
    if (used_pct >= config::storage_flood_stage_usage_percent / 100.0 &&
        left_bytes <= config::storage_flood_stage_left_capacity_bytes) {
        LOG(WARNING) << "reach capacity limit. used pct: " << used_pct
                     << ", left bytes: " << left_bytes << ", path: " << _path;
        return true;
    }
    return false;
}
  • then the backend will return an error. It is still treated as a query execution candidate, though, since exceedLimit continues to return false:
    public boolean exceedLimit(boolean floodStage) {
        if (LOG.isDebugEnabled()) {
            LOG.debug("flood stage: {}, diskAvailableCapacityB: {}, totalCapacityB: {}",
                    floodStage, diskAvailableCapacityB, totalCapacityB);
        }
        if (floodStage) {
            return diskAvailableCapacityB < Config.storage_flood_stage_left_capacity_bytes
                && this.getUsedPct() > (Config.storage_flood_stage_usage_percent / 100.0);
        } else {
            return diskAvailableCapacityB < Config.storage_min_left_capacity_bytes
                || this.getUsedPct() > (Config.storage_high_watermark_usage_percent / 100.0);
        }
    }

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions