Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test build, DO NOT MERGE #1433

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
34 changes: 34 additions & 0 deletions .github/scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## this script is to update for major/minor updates
## the input version format should be like: 1.0 or 0.12
VERSION=$1

echo "Processing variables"
cp variables/variables-nightly.ts variables/variables-$VERSION.ts
sed -i "s/greptimedbVersion: 'v[^']*'/greptimedbVersion: 'v$VERSION.0'/" variables/variables-$VERSION.ts
sed -i "s/greptimedbVersion: 'v[^']*'/greptimedbVersion: 'v$VERSION.0'/" variables/variables-nightly.ts

echo "Processing localized sidebars"
cp i18n/zh/docusaurus-plugin-content-docs/current.json i18n/zh/docusaurus-plugin-content-docs/version-$VERSION.json
jq 'del(.["version.label"])' i18n/zh/docusaurus-plugin-content-docs/version-$VERSION.json > temp.json && mv temp.json i18n/zh/docusaurus-plugin-content-docs/version-$VERSION.json

echo "Removing greptimecloud content from current version"
CURRENT_VERSION=$(jq -r '.[0]' versions.json)
rm -rf versioned_docs/version-$CURRENT_VERSION/greptimecloud
rm -rf i18n/zh/docusaurus-plugin-content-docs/version-$CURRENT_VERSION/greptimecloud
jq 'del(.docs[] | select(.label == "GreptimeCloud"))' versioned_sidebars/version-$CURRENT_VERSION-sidebars.json > temp.json && mv temp.json versioned_sidebars/version-$CURRENT_VERSION-sidebars.json
sed -i '/^- \[GreptimeCloud\]/d' versioned_docs/version-$CURRENT_VERSION/index.md
sed -i '/^- \[GreptimeCloud\]/d' i18n/zh/docusaurus-plugin-content-docs/version-$CURRENT_VERSION/index.md

echo "Generating new version"
npm run docusaurus docs:version $VERSION

echo "Removing oldest version"
OLDEST_VERSION=$(jq -r '.[-1]' versions.json)
rm -rf versioned_docs/version-$OLDEST_VERSION
rm -rf i18n/zh/docusaurus-plugin-content-docs/version-$OLDEST_VERSION/
rm i18n/zh/docusaurus-plugin-content-docs/version-$OLDEST_VERSION.json
rm versioned_sidebars/version-$OLDEST_VERSION-sidebars.json
jq '.[:-1]' versions.json > temp.json && mv temp.json versions.json

# echo "Set new default"
# npm run docusaurus docs:use-version $VERSION
39 changes: 39 additions & 0 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Version Docs

on:
workflow_dispatch:
inputs:
version:
description: 'Version number without patch (e.g., 1.0 or 0.12)'
required: true
type: string

jobs:
update-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 22

- name: Install dependencies
run: npm install

- name: Call update scripts
run: |
VERSION=${{ github.event.inputs.version }}
.github/scripts/release.sh $VERSION

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
commit-message: "Version docs to ${{ github.event.inputs.version }}"
title: "Version docs to ${{ github.event.inputs.version }}"
body: "This PR updates the docs to version ${{ github.event.inputs.version }}."
branch: "version-docs-${{ github.event.inputs.version }}"
base: main
delete-branch: true
6 changes: 0 additions & 6 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,6 @@ const config: Config = {
current: {
label: 'nightly',
path: 'nightly',
},
'0.8': {
path: 'v0.8'
},
'0.7': {
path: 'v0.7'
}
},
remarkPlugins: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
"message": "概念",
"description": "The label for category Concepts in sidebar docs"
},
"sidebar.docs.category.Clients": {
"message": "客户端",
"description": "The label for category Clients in sidebar docs"
},
"sidebar.docs.category.Migrate to GreptimeDB": {
"message": "迁移到 GreptimeDB",
"description": "The label for category Migrate to GreptimeDB in sidebar docs"
Expand All @@ -31,9 +27,9 @@
"message": "读取数据",
"description": "The label for category Query Data in sidebar docs"
},
"sidebar.docs.category.Continuous Aggregation": {
"message": "持续聚合",
"description": "The label for category Continuous Aggregation in sidebar docs"
"sidebar.docs.category.Flow Computation": {
"message": "流计算",
"description": "The label for category Flow Computation in sidebar docs"
},
"sidebar.docs.category.Logs": {
"message": "日志",
Expand All @@ -43,14 +39,26 @@
"message": "客户端库",
"description": "The label for category Client Libraries in sidebar docs"
},
"sidebar.docs.category.Operations": {
"message": "运维操作",
"sidebar.docs.category.Administration": {
"message": "管理",
"description": "The label for category Operations in sidebar docs"
},
"sidebar.docs.category.Authentication": {
"message": "鉴权",
"description": "The label for category Authentication in sidebar docs"
},
"sidebar.docs.category.Deployments": {
"message": "部署",
"description": "The label for category Deployments in sidebar docs"
},
"sidebar.docs.category.Deploy on Kubernetes": {
"message": "部署到 Kubernetes",
"description": "The label for category Deploy on Kubernetes in sidebar docs"
},
"sidebar.docs.category.Manage GreptimeDB Operator": {
"message": "管理 GreptimeDB Operator",
"description": "The label for category Deploy on Kubernetes in sidebar docs"
},
"sidebar.docs.category.Disaster Recovery": {
"message": "灾难恢复",
"description": "The label for category Disaster Recovery in sidebar docs"
Expand Down Expand Up @@ -91,6 +99,10 @@
"message": "监控 Host Metrics",
"description": "The label for category Monitor Host Metrics in sidebar docs"
},
"sidebar.docs.category.GreptimeDB Enterprise": {
"message": "GreptimeDB 企业版",
"description": "The label for category GreptimeDB Enterprise in sidebar docs"
},
"sidebar.docs.category.Reference": {
"message": "Reference",
"description": "The label for category Reference in sidebar docs"
Expand Down Expand Up @@ -143,16 +155,36 @@
"message": "Release Notes",
"description": "The label for link Release Notes in sidebar docs, linking to /release-notes"
},
"version.label": {
"message": "0.7",
"description": "The label for version 0.7"
"sidebar.docs.category.Ingest Data": {
"message": "写入数据",
"description": "The label for category Ingest Data in sidebar docs"
},
"sidebar.docs.category.For Observerbility": {
"message": "可观测场景",
"description": "The label for category For Observerbility in sidebar docs"
},
"sidebar.docs.category.For IoT": {
"message": "物联网(IoT)场景",
"description": "The label for category For IoT in sidebar docs"
},
"sidebar.docs.category.gRPC SDKs": {
"message": "gRPC SDKs",
"description": "The label for category gRPC SDKs in sidebar docs"
},
"sidebar.docs.category.Manage Data": {
"message": "管理数据",
"description": "The label for category Manage Data in sidebar docs"
},
"sidebar.docs.category.Protocols": {
"message": "协议",
"description": "The label for category Manage Data in sidebar docs"
},
"sidebar.docs.category.Quick Start": {
"message": "快速开始",
"description": "The label for category Quick Start in sidebar docs"
"sidebar.docs.category.Monitoring": {
"message": "监控",
"description": "The label for category Monitoring in sidebar docs"
},
"sidebar.docs.category.Benchmarks": {
"message": "Benchmarks",
"description": "The label for category Benchmarks in sidebar docs"
"sidebar.docs.category.Vector Storage": {
"message": "向量存储",
"description": "The label for category Vector Storage in sidebar docs"
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
keywords: [数据持久化, 索引机制, SST 文件, 倒排索引]
description: 介绍了 GreptimeDB 的数据持久化和索引机制,包括 SST 文件格式、数据持久化过程和倒排索引的实现。
---

# 数据持久化与索引

与所有类似 LSMT 的存储引擎一样,MemTables 中的数据被持久化到耐久性存储,例如本地磁盘文件系统或对象存储服务。GreptimeDB 采用 [Apache Parquet][1] 作为其持久文件格式。
Expand All @@ -12,7 +17,7 @@ Parquet 具有层次结构,类似于“行组-列-数据页”。Parquet 文

其次,相同列的数据往往是同质的(比如具备近似的值),这有助于在采用字典和 Run-Length Encoding(RLE)等技术进行压缩。

![Parquet file format](/parquet-file-format.png)
<img src="/parquet-file-format.png" alt="Parquet file format" width="500"/>

## 数据持久化

Expand All @@ -23,7 +28,7 @@ GreptimeDB 提供了 `storage.flush.global_write_buffer_size` 的配置项来设

Apache Parquet 文件格式在列块和数据页的头部提供了内置的统计信息,用于剪枝和跳过。

![Column chunk header](/column-chunk-header.png)
<img src="/column-chunk-header.png" alt="Column chunk header" width="350"/>

例如,在上述 Parquet 文件中,如果你想要过滤 `name` 等于 `Emily` 的行,你可以轻松跳过行组 0,因为 `name` 字段的最大值是 `Charlie`。这些统计信息减少了 IO 操作。

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
keywords: [Metric 引擎, 逻辑表, 物理表, DDL 操作]
description: 介绍了 Metric 引擎的概念、架构及设计,重点描述了逻辑表与物理表的区别和批量 DDL 操作的实现。
---

# Metric 引擎

## 概述
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
keywords: [Datanode, gRPC 服务, HTTP 服务, Heartbeat Task, Region Manager]
description: 介绍了 Datanode 的主要职责和组件,包括 gRPC 服务、HTTP 服务、Heartbeat Task 和 Region Manager。
---

# Datanode

## Introduction
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
keywords: [Python 脚本, 数据分析, CPython, RustPython]
description: 介绍了在 GreptimeDB 中使用 Python 脚本进行数据分析的两种后端实现:CPython 和嵌入式 RustPython 解释器。
---

# Python 脚本

## 简介
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
keywords: [查询引擎, DataFusion, 逻辑计划, 物理计划]
description: 介绍了 GreptimeDB 的查询引擎架构,基于 Apache DataFusion 构建,涵盖逻辑计划、物理计划、优化和执行过程。
---

# Query Engine

## 介绍
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
keywords: [存储引擎, Mito, LSMT, 数据模型, Region]
description: 详细介绍了 GreptimeDB 的存储引擎架构、数据模型和 region 的概念,重点描述了 Mito 存储引擎的优化和组件。
---

# 存储引擎

## 概述
Expand Down Expand Up @@ -52,6 +57,6 @@ tag-1, ..., tag-m, timestamp -> field-1, ..., field-n
- field 列是可空的
- 数据按照 tag 列和 timestamp 列有序存储

## 区域(Region
## Region

数据在存储引擎中以 `region`(区域)的形式存储,`region` 是引擎中的一个逻辑隔离存储单元。`region` 中的行必须具有相同的 `schema`(模式),该 `schema` 定义了 `region` 中的 tag 列,timestamp 列和 field 列。数据库中表的数据存储在一到多个 `region` 中。
数据在存储引擎中以 `region` 的形式存储,`region` 是引擎中的一个逻辑隔离存储单元。`region` 中的行必须具有相同的 `schema`(模式),该 `schema` 定义了 `region` 中的 tag 列,timestamp 列和 field 列。数据库中表的数据存储在一到多个 `region` 中。
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
keywords: [预写日志, WAL, 数据持久化, 同步刷盘, 异步刷盘]
description: 介绍了 GreptimeDB 的预写日志(WAL)机制,包括其命名空间、同步/异步刷盘策略和在数据节点重启时的重放功能。
---

# 预写日志

## 介绍
Expand All @@ -12,7 +17,7 @@

## 命名空间

WAL 的命名空间用于区分来自不同 region 的条目。追加和读取操作必须提供一个命名空间。目前,区域 ID 被用作命名空间,因为每个区域都有一个在数据节点重新启动时需要重构的 MemTable。
WAL 的命名空间用于区分来自不同 region 的条目。追加和读取操作必须提供一个命名空间。目前,region ID 被用作命名空间,因为每个 region 都有一个在数据节点重新启动时需要重构的 MemTable。

## 同步/异步刷盘

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
keywords: [Arrangement, 状态存储, 键值对]
description: 描述了 Arrangement 在数据流进程中的状态存储功能,包括键值对存储、查询和删除操作的实现。
---

# Arrangement

Arrangement 存储数据流进程中的状态,存储 flow 的更新流(stream)以供进一步查询和更新。

Arrangement 本质上存储的是带有时间戳的键值对。
在内部,Arrangement 接收类似 `((Key Row, Value Row), timestamp, diff)` 的 tuple,并将其存储在内存中。
你可以使用 `get(now: Timestamp, key: Row)` 查询某个时间的键值对。
Arrangement 假定早于某个时间(也称为 Low Watermark)的所有内容都已被写入到 sink 表中,不会为其保留历史记录。

:::tip 注意
Arrangement 允许通过将传入 tuple 的 `diff` 设置为 -1 来删除键。
此外,如果已将行数据添加到 Arrangement 并且使用不同的值插入相同的键,则原始值将被新值覆盖。
:::
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
keywords: [Dataflow, SQL 查询, 执行计划, 数据流, map, reduce]
description: 解释了 Dataflow 模块的核心计算功能,包括 SQL 查询转换、内部执行计划、数据流的触发运行和支持的操作。
---

# 数据流

Dataflow 模块(参见 `flow::compute` 模块)是 `flow` 的核心计算模块。
它接收 SQL 查询并将其转换为 `flow` 的内部执行计划。
然后,该执行计划被转化为实际的数据流,而数据流本质上是一个由带有输入和输出端口的函数组成的有向无环图(DAG)。
数据流会在需要时被触发运行。

目前该数据流只支持 `map`和 `reduce` 操作,未来将添加对 `join` 等操作的支持。

在内部,数据流使用 `tuple(row, time, diff)` 以行格式处理数据。
这里 `row` 表示实际传递的数据,可能包含多个 `value` 对象。
`time` 是系统时间,用于跟踪数据流的进度,`diff` 通常表示行的插入或删除(+1 或 -1)。
因此,`tuple` 表示给定系统时间的 `row` 的插入/删除操作。
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
keywords: [Flownode, 流处理, FlownodeManager, FlowWorker]
description: 介绍了 Flownode 的基本概念、组件和当前版本的支持情况,包括 FlownodeManager、FlowWorker 和 Flow 的功能。
---

# 概述

## 简介

`Flownode` 为数据库提供了一种简单的流处理(称为 `flow`)能力。
`Flownode` 管理 `flow`,这些 `flow` 是从 `source` 接收数据并将数据发送到 `sink` 的任务。

在当前版本中,`Flownode` 仅在单机模式中支持,未来将支持分布式模式。

## 组件

`Flownode` 包含了 flow 流式处理的所有组件,以下是关键部分:

- `FlownodeManager`:用于接收从 `Frontend` 转发的插入数据并将结果发送回 flow 的 sink 表。
- 一定数量的 `FlowWorker` 实例,每个实例在单独的线程中运行。当前在单机模式中只有一个 flow worker,但这可能会在未来发生变化。
- `Flow` 是一个主动从 `source` 接收数据并将数据发送到 `sink` 的任务。由 `FlownodeManager` 管理并由 `FlowWorker` 运行。
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
keywords: [分布式查询, 查询拆分, 查询合并, TableScan, 物理计划]
description: 介绍 GreptimeDB 中的分布式查询方法,包括查询的拆分和合并过程,以及 TableScan 节点的作用。
---

# 分布式查询

我们知道在 GreptimeDB 中数据是如何分布的(参见“[表分片][1]”),那么如何查询呢?在 GreptimeDB 中,分布式查询非常简单。简单来说,我们只需将查询拆分为子查询,每个子查询负责查询表数据的一个部分,然后将所有结果合并为最终结果。这是一种典型的“拆分-合并”方法。具体来说,让我们从查询到达 `frontend` 开始。
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
keywords: [Frontend, 客户端请求, 租户管理, 鉴权认证, 流量控制]
description: 介绍 GreptimeDB 中 Frontend 的功能和部署。
---

# 概述

`Frontend` 执行客户端的请求,也处理云服务中的一些特定任务,例如租户管理、鉴权认证、流量控制等。
Expand All @@ -13,6 +18,6 @@
- [表分片][2]
- [分布式查询][3]

[1]: /user-guide/clients/overview.md
[1]: /user-guide/protocols/overview.md
[2]: ./table-sharding.md
[3]: ./distributed-querying.md
Loading
Loading