> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-detect-table-modification.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# iceberg_compaction_* 会话设置

> ClickHouse 中 iceberg_compaction_* 生成组的会话设置。

export const VersionHistory = ({rows = []}) => {
  if (rows.length === 0) {
    return null;
  }
  const headers = ["版本", "默认值", "注释"];
  const border = "1px solid rgba(128, 128, 128, 0.3)";
  const cell = {
    border,
    padding: "0.25rem 0.5rem",
    textAlign: "start",
    verticalAlign: "top"
  };
  return <details className="not-prose" style={{
    border,
    borderRadius: "0.5rem",
    margin: "0.5rem 0",
    padding: "0.5rem 0.75rem",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <summary style={{
    cursor: "pointer",
    fontWeight: 600,
    opacity: 0.72
  }}>
        版本历史
      </summary>
      <table style={{
    borderCollapse: "collapse",
    width: "100%",
    margin: "0.5rem 0 0"
  }}>
        <thead>
          <tr>
            {headers.map(header => <th key={header} style={{
    ...cell,
    fontWeight: 600,
    opacity: 0.72
  }}>
                {header}
              </th>)}
          </tr>
        </thead>
        <tbody>
          {rows.map((row, row_index) => <tr key={row.id ?? row_index}>
              {(row.items ?? []).map((item, item_index) => <td key={item_index} style={{
    ...cell,
    overflowWrap: "anywhere"
  }}>
                  {item?.label}
                </td>)}
            </tr>)}
        </tbody>
      </table>
    </details>;
};

export const SettingsInfoBlock = ({type, default_value, changeable_without_restart}) => {
  return <div className="not-prose" style={{
    display: "flex",
    flexWrap: "wrap",
    alignItems: "baseline",
    columnGap: "0.5rem",
    rowGap: "0.125rem",
    margin: "0.375rem 0",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <div style={{
    fontWeight: 600,
    opacity: 0.72
  }}>类型</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{type}</div>
      <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>默认值</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{default_value}</div>
      {changeable_without_restart && <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>
          无需重启即可更改
        </div>}
      {changeable_without_restart && <div style={{
    overflowWrap: "anywhere"
  }}>
          {changeable_without_restart}
        </div>}
    </div>;
};

这些设置可在 [system.settings](/zh/reference/system-tables/settings) 中查看，并根据 [源代码](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp) 自动生成。

<div id="iceberg_compaction_commit_batch_size">
  ## iceberg\_compaction\_commit\_batch\_size
</div>

<SettingsInfoBlock type="UInt64" default_value="100" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.9"},{"label": "100"},{"label": "新增设置"}]}, {"id": "row-2","items": [{"label": "26.8"},{"label": "100"},{"label": "新增设置"}]}]} />

后台 Iceberg 合并整理在新快照中发布前累计的已合并数据文件数量。

当不再有可合并整理的候选项时，合并整理结果始终会被发布。因此，此设置仅限制在合并整理不断发现新任务时，已合并文件未发布的最长时间。`0` 会恢复旧行为：仅当合并整理没有剩余候选项时才发布——如果表持续接收新的数据文件，则永远不会达到这一状态，因此每个合并后的输出都会写入对象存储，但不会被任何快照引用。

<div id="iceberg_compaction_data_cleanup">
  ## iceberg\_compaction\_data\_cleanup
</div>

<SettingsInfoBlock type="Seconds" default_value="10800" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.5"},{"label": "10800"},{"label": "新增设置"}]}]} />

超过该时间后，数据将被删除。

<div id="iceberg_compaction_delay_bias">
  ## iceberg\_compaction\_delay\_bias
</div>

<SettingsInfoBlock type="Seconds" default_value="10800" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.5"},{"label": "10800"},{"label": "新增设置"}]}]} />

两次后台合并整理操作之间的最小延迟时间。

<div id="iceberg_compaction_max_bytes_in_data_file">
  ## iceberg\_compaction\_max\_bytes\_in\_data\_file
</div>

<SettingsInfoBlock type="UInt64" default_value="18446744073709551615" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.9"},{"label": "18446744073709551615"},{"label": "新增设置：用于指定合并整理生成的 Iceberg 数据文件的最大字节数，独立于写入时限制。"}]}, {"id": "row-2","items": [{"label": "26.7"},{"label": "18446744073709551615"},{"label": "新增设置：用于指定合并整理生成的 Iceberg 数据文件的最大字节数，独立于写入时限制。"}]}]} />

合并整理生成的 Iceberg Parquet 数据文件的最大字节数。默认值为最大值，使合并整理尽可能将符合条件的文件合并为更少的输出文件。

<div id="iceberg_compaction_max_rows_in_data_file">
  ## iceberg\_compaction\_max\_rows\_in\_data\_file
</div>

<SettingsInfoBlock type="UInt64" default_value="18446744073709551615" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.9"},{"label": "18446744073709551615"},{"label": "新增设置：合并整理生成的 Iceberg 数据文件的最大行数，与写入时限制分开。"}]}, {"id": "row-2","items": [{"label": "26.7"},{"label": "18446744073709551615"},{"label": "新增设置：合并整理生成的 Iceberg 数据文件的最大行数，与写入时限制分开。"}]}]} />

合并整理生成的 Iceberg Parquet 数据文件的最大行数。默认值为最大值，以便合并整理将符合条件的文件合并为尽可能少的输出文件。若此值高于合并整理实际可生成的文件大小，每个输出文件都会低于 `iceberg_data_file_size_lower_threshold_compaction`，从而被永久重复选中。
