Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 25, 2025

What's Changed in this PR

Documents behavior change from GreptimeTeam/greptimedb#7402: database-level compaction options now use runtime resolution with inheritance priority (table-level > database-level > defaults), matching TTL behavior.

Key Changes:

  • CREATE DATABASE: Moved compaction.* from "template-only" to "runtime-resolved" category alongside TTL
  • ALTER DATABASE: Clarified that compaction option changes immediately affect all tables without explicit overrides
  • SHOW CREATE TABLE: Added note that inherited database-level compaction settings are displayed in WITH() clause
  • Compaction guide: Documented inheritance hierarchy and dynamic resolution mechanics

Versions Updated:

  • Current/main version (docs/)
  • Version 1.0 (versioned_docs/version-1.0/) - latest stable release
  • Both English and Chinese translations

Before:

  • Database compaction settings copied to table metadata at creation time
  • Changing database settings only affected new tables

After:

  • Compaction settings resolved dynamically at compaction scheduling
  • Changing database settings immediately affects existing tables without explicit overrides
  • SHOW CREATE TABLE reflects effective settings including inherited values

Checklist

  • Please confirm that all corresponding versions of the documents have been revised.
  • Please ensure that the content in sidebars.ts matches the current document structure when you changed the document structure.
  • This change requires follow-up update in localized docs.
Original prompt

This section details on the original issue you should resolve

<issue_title>Update docs for fix(compaction): unify behavior of database compaction options with TTL</issue_title>
<issue_description>A document change request is generated from GreptimeTeam/greptimedb#7402</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 25, 2025

Deploying greptime-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8fad1cd
Status: ✅  Deploy successful!
Preview URL: https://46e8ee0e.greptime-docs.pages.dev
Branch Preview URL: https://copilot-update-docs-database.greptime-docs.pages.dev

View logs

@fengjiachun
Copy link
Contributor

@copilot Also need to add the documentation for the latest stable release.

Copilot AI changed the title [WIP] Update documentation for database compaction options docs: update database-level compaction options to reflect runtime resolution behavior Dec 25, 2025
Copilot AI requested a review from fengjiachun December 25, 2025 04:29
Copy link
Contributor Author

Copilot AI commented Dec 25, 2025

@copilot Also need to add the documentation for the latest stable release.

Done. Updated documentation for version 1.0 (latest stable release) with the same changes. Commit: 8fad1cd

Copy link
Contributor

@killme2008 killme2008 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost LGTM

您也可以为数据库中的所有表设置默认压缩参数。这些设置将被没有明确设置压缩选项的表继承。参见 [ALTER DATABASE](/reference/sql/alter.md#修改数据库的压缩选项) 获取示例。

:::note
与存储在表元数据中的表级别设置不同,数据库级别的压缩设置在运行时动态解析。更改数据库级别的压缩选项会立即影响数据库中所有没有明确设置压缩选项的表。此行为类似于[数据库级别的 TTL](/reference/sql/create.md#create-database) 的工作方式。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link of 数据库级别的 TTL in chinese is different.

@killme2008 killme2008 marked this pull request as ready for review December 30, 2025 06:32
Copy link
Contributor

@v0y4g3r v0y4g3r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@killme2008 killme2008 merged commit b5a8249 into main Dec 30, 2025
7 checks passed
@killme2008 killme2008 deleted the copilot/update-docs-database-compaction branch December 30, 2025 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update docs for fix(compaction): unify behavior of database compaction options with TTL

4 participants