Skip to content

Commit 71c0736

Browse files
authored
Merge branch 'main' into mihir119CH-patch-2
2 parents 2b4db4c + c3ae34d commit 71c0736

312 files changed

Lines changed: 2769 additions & 10179 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/check-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ jobs:
3737
uses: actions/setup-node@v6
3838
with:
3939
node-version: 20
40-
- name: Install markdownlint-cli2
40+
- name: Install markdown lint dependencies
4141
if: matrix.check_type == 'md-lint'
42-
run: yarn add -D markdownlint-cli2
42+
run: yarn install --frozen-lockfile
4343

4444
# Run the checks here
4545
- name: Run spellcheck
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import tls_settings from '@site/static/images/integrations/data-ingestion/clickpipes/postgres/tls-settings.png';
2+
import pipe_connection_settings from '@site/static/images/integrations/data-ingestion/clickpipes/postgres/pipe-connection-settings.png';
3+
import pipe_edit_connection from '@site/static/images/integrations/data-ingestion/clickpipes/postgres/pipe-edit-connection.png';
4+
import Image from '@theme/IdealImage';
5+
6+
By default, your ClickPipe will be created with TLS enabled and certificate verification. These defaults can be modified upon ClickPipe creation:
7+
8+
<Image img={tls_settings} alt="TLS settings" size="lg" border/>
9+
10+
Or edited at the _Connection settings_ section of your paused ClickPipe _Settings_ tab:
11+
12+
<Image img={pipe_connection_settings} alt="Connection settings -> Edit Connection" size="lg" border/>
13+
14+
<Image img={pipe_edit_connection} alt="Edit Connection" size="lg" border/>
15+
16+
Where:
17+
18+
- `Disable TLS` toggles TLS for the connection on or off. Turning TLS off means data is sent as plaintext over the network, potentially including secrets and sensitive data.
19+
- `Skip certificate verification` toggles on or off the verification of the certificate presented by the source database. Take into consideration the security implications of skipping certificate verification.
20+
- `TLS Host` (optional, defaults to the source _Host_) is the hostname the certificate's CN must match when certificate verification is enabled.
21+
- `Upload CA` can be used to provide a CA used when certificate verification is enabled.

docs/best-practices/minimize_optimize_joins.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ ClickHouse supports several JOIN algorithms that trade off between speed and mem
5858
Each algorithm has varying support for JOIN types. A full list of supported join types for each algorithm can be found [here](/guides/joining-tables#choosing-a-join-algorithm).
5959
:::
6060

61-
You can let ClickHouse choose the best algorithm by setting `join_algorithm = 'auto'` (the default), or explicitly control it based on your workload. If you need to select a join algorithm to optimize for performance or memory overhead, we recommend [this guide](/guides/joining-tables#choosing-a-join-algorithm).
61+
You can let ClickHouse choose the best algorithm by setting `join_algorithm = 'auto'`, or explicitly control it based on your workload. The default value is `direct,parallel_hash,hash`, so ClickHouse uses a direct join when the right-hand side is a dictionary or key-value engine and otherwise falls back to parallel hash, then hash. If you need to select a join algorithm to optimize for performance or memory overhead, we recommend [this guide](/guides/joining-tables#choosing-a-join-algorithm).
6262

6363
For optimal performance:
6464

docs/chdb/install/c.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,4 +327,4 @@ cleanup:
327327

328328
- **Main Repository**: [chdb-io/chdb](https://github.com/chdb-io/chdb)
329329
- **Issues and Support**: Report issues on the [GitHub repository](https://github.com/chdb-io/chdb/issues)
330-
- **C API Documentation**: [Bindings Documentation](https://github.com/chdb-io/chdb/blob/main/bindings.md)
330+
- **C API Documentation**: [Bindings Documentation](https://github.com/chdb-io/chdb-core/blob/main/bindings.md)

docs/chdb/install/python.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ result = sess.query("""
277277
""", "JSON")
278278
```
279279

280-
See also: [test_stateful.py](https://github.com/chdb-io/chdb/blob/main/tests/test_stateful.py).
280+
See also: [test_stateful.py](https://github.com/chdb-io/chdb-core/blob/main/tests/test_stateful.py).
281281

282282
### Python DB-API 2.0 interface {#python-db-api-20}
283283

docs/chdb/reference/data-formats.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Output formats are used to arrange the results of a `SELECT`, and to perform `IN
1414
As well as the data formats that ClickHouse supports, chDB also supports:
1515

1616
- `ArrowTable` as an output format, the type is Python `pyarrow.Table`
17-
- `DataFrame` as an input and output format, the type is Python `pandas.DataFrame`. For examples, see [`test_joindf.py`](https://github.com/chdb-io/chdb/blob/main/tests/test_joindf.py)
17+
- `DataFrame` as an input and output format, the type is Python `pandas.DataFrame`. For examples, see [`test_joindf.py`](https://github.com/chdb-io/chdb-core/blob/main/tests/test_joindf.py)
1818
- `Debug` as ab output (as an alias of `CSV`), but with enabled debug verbose output from ClickHouse.
1919

2020
The supported data formats from ClickHouse are:

docs/cloud/features/02_integrations/02_data_catalogs.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,25 @@ Through the integration, your catalog's tables will appear as queryable database
1818
Setup is available both via SQL command ([DataLakeCatalog](/engines/database-engines/datalakecatalog)) and via the ClickHouse Cloud UI on the Data Sources tab.
1919

2020
Using the UI:
21+
2122
- Simplifies setup with a form using fields consistent with your Data Catalog objects
2223
- Provides a single interface for active data catalog integrations
2324
- Tests connections and credentials when saving
2425

2526
<Image img={data_catalogs_ui} size="md" alt="ClickHouse Cloud UI with data catalog integrations"/>
2627

27-
| Name | Open Table Format Supported | Auth Method | Support | Version |
28-
|------|-----------------------------|----------------------------------------|---------|---------|
29-
| AWS Glue Catalog | Iceberg | IAM/Access keys | Cloud & [Core](/use-cases/data-lake/glue-catalog) | 25.10+ |
30-
| Lakekeeper | Iceberg | OAuth client credentials | [Core](/use-cases/data-lake/lakekeeper-catalog) | 25.10+ |
31-
| Microsoft OneLake | Iceberg | Azure Active Directory (AAD) | Cloud & [Core](/use-cases/data-lake/onelake-catalog) | 25.12+ |
32-
| Nessie | Iceberg | OAuth client credentials | [Core](/use-cases/data-lake/nessie-catalog) | 25.10+ |
33-
| Polaris/Open Catalog | Iceberg | OAuth client credentials | [Core](/use-cases/data-lake/polaris-catalog) | 26.1+ |
34-
| REST catalog | Iceberg | OAuth client credentials, Bearer token | Cloud & [Core](/use-cases/data-lake/rest-catalog) | 25.10+ |
35-
| Unity Catalog | Iceberg (UniForm-enabled and managed), Delta | OAuth client credentials | Cloud (Iceberg only) & [Core](/use-cases/data-lake/unity-catalog) | 25.10+ |
36-
37-
We have more catalogs planned, including Horizon and S3 tables REST endpoint.
28+
For a step-by-step Cloud UI walkthrough, see [Connect a data catalog in ClickHouse Cloud](/integrations/data-catalogs).
29+
30+
| Name | Open table format | Auth method | Cloud | Core | Version |
31+
| ----------------- | ----------------- | -------------------------------------- | ---------------------------------------------------------- | ------------------------------------------------ | ------- |
32+
| AWS Glue Catalog | Iceberg | IAM role (26.2+), Access keys | [Guide](/integrations/data-catalogs?catalog=aws-glue#add-your-catalog-connection) | [Guide](/use-cases/data-lake/glue-catalog) | 25.10+ |
33+
| BigLake Metastore | Iceberg | Google ADC (OAuth) | [Guide](/integrations/data-catalogs?catalog=biglake#add-your-catalog-connection) | [Guide](/use-cases/data-lake/biglake-catalog) | 26.2+ |
34+
| Lakekeeper | Iceberg | OAuth client credentials || [Guide](/use-cases/data-lake/lakekeeper-catalog) | 25.10+ |
35+
| Microsoft OneLake | Iceberg | Azure Active Directory (AAD) | [Guide](/integrations/data-catalogs?catalog=onelake#add-your-catalog-connection) | [Guide](/use-cases/data-lake/onelake-catalog) | 25.12+ |
36+
| Nessie | Iceberg | OAuth client credentials || [Guide](/use-cases/data-lake/nessie-catalog) | 25.10+ |
37+
| Polaris | Iceberg | OAuth client credentials | [Guide](/integrations/data-catalogs?catalog=polaris#add-your-catalog-connection) | [Guide](/use-cases/data-lake/polaris-catalog) | 26.1+ |
38+
| REST catalog | Iceberg | OAuth client credentials, Bearer token | [Guide](/integrations/data-catalogs?catalog=rest#add-your-catalog-connection) | [Guide](/use-cases/data-lake/rest-catalog) | 25.10+ |
39+
| Unity Catalog | Iceberg | OAuth client credentials | [Guide](/integrations/data-catalogs?catalog=unity-iceberg#add-your-catalog-connection) | [Guide](/use-cases/data-lake/unity-catalog) | 25.10+ |
40+
| Unity Catalog | Delta | Personal Access Token (PAT) | [Guide](/integrations/data-catalogs?catalog=unity-delta#add-your-catalog-connection) | [Guide](/use-cases/data-lake/unity-catalog) | 25.10+ |
41+
42+
We have more catalogs planned, including Horizon and S3 tables REST endpoint.

docs/cloud/features/03_sql_console_features/05_user_defined_functions.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ for line in sys.stdin:
8686
EOF
8787
```
8888

89-
If your Python script imports third-party packages, you must create a `requirements.txt` file listing those dependencies. For example:
89+
If your Python script imports third-party packages, list them in a `requirements.txt` file and ClickHouse Cloud installs them for you. You can instead bundle dependencies directly in the ZIP, but then you must include cached packages for both CPU architectures, so `requirements.txt` is simpler. For example:
9090

9191
```text
9292
requests>=2.28.0
@@ -167,6 +167,8 @@ true false
167167

168168
### Create a new version {#create-new-version}
169169

170+
To change a UDF's code, create a new version. The **Edit** panel only manages which services a UDF is assigned to; uploading a file there won't replace the deployed code.
171+
170172
1. From the Cloud console homepage, click on the name of your organization in the bottom-left menu.
171173
2. Select **User-defined functions** from the menu.
172174
3. Select the three dots under **Actions** for the `isBusinessHours` UDF, click **Create new version**

docs/cloud/features/04_automatic_scaling/05_automatic_idling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ When you create a ClickHouse Cloud service, the default setting for the IP allow
1717

1818
### Adaptive Idling {#adaptive-idling}
1919
ClickHouse Cloud implements adaptive idling to prevent disruptions while optimizing cost savings. The system evaluates several conditions before transitioning a service to idle. Adaptive idling overrides the idling duration setting when any of the below listed conditions are met:
20-
- When the number of parts exceeds the maximum idle parts threshold (default: 10,000), the service isn't idled so that background maintenance can continue
20+
- When the number of parts exceeds the maximum active parts threshold (default: 10,000), the service isn't idled so that background maintenance can continue
2121
- When there are ongoing merge operations, the service isn't idled until those merges complete to avoid interrupting critical data consolidation
2222
- Additionally, the service also adapts idle timeouts based on server initialization time:
2323
- If server initialization time is less than 15 minutes, no adaptive timeout is applied and the customer-configured default idle timeout is used

docs/cloud/features/05_infrastructure/replica-aware-routing.md

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,55 @@
22
title: 'Replica-aware routing'
33
slug: /manage/replica-aware-routing
44
description: 'How to use Replica-aware routing to increase cache re-use'
5-
keywords: ['cloud', 'sticky endpoints', 'sticky', 'endpoints', 'sticky routing', 'routing', 'replica aware routing']
5+
keywords: ['cloud', 'sticky endpoints', 'sticky', 'endpoints', 'sticky routing', 'routing', 'replica aware routing', 'session_id']
66
doc_type: 'guide'
7+
unlisted: true
78
---
89

910
import PrivatePreviewBadge from '@theme/badges/PrivatePreviewBadge';
1011

1112
<PrivatePreviewBadge/>
1213

13-
Replica-aware routing (also known as sticky sessions, sticky routing, or session affinity) utilizes [Envoy proxy's ring hash load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/load_balancers#ring-hash). The main purpose of replica-aware routing is to increase the chance of cache reuse. It doesn't guarantee isolation.
14+
Replica-aware routing (also known as sticky sessions, sticky routing, or session affinity) increases the chance of cache reuse by consistently routing related requests to the same ClickHouse replica. It is best-effort and does not guarantee isolation.
1415

15-
When enabling replica-aware routing for a service, we allow a wildcard subdomain on top of the service hostname. For a service with the host name `abcxyz123.us-west-2.aws.clickhouse.cloud`, you can use any hostname which matches `*.sticky.abcxyz123.us-west-2.aws.clickhouse.cloud` to visit the service:
16+
:::warning Protocol support — HTTP/HTTPS only
17+
Replica-aware routing is applied at the proxy layer over the **HTTP/HTTPS interface**, using the `session_id` query parameter (see below). It is **not available over the native protocol** (native port, e.g. the `clickhouse-go` driver in its default native mode). If you need sticky routing from a native-protocol client, connect that workload over the HTTP interface instead — for `clickhouse-go` (v2), set `Protocol: clickhouse.HTTP` on the connection.
18+
:::
1619

17-
|Example hostnames|
18-
|---|
19-
|`aaa.sticky.abcxyz123.us-west-2.aws.clickhouse.cloud`|
20-
|`000.sticky.abcxyz123.us-west-2.aws.clickhouse.cloud`|
21-
|`clickhouse-is-the-best.sticky.abcxyz123.us-west-2.aws.clickhouse.cloud`|
20+
## HTTP-based routing (session_id) {#http-based-routing}
2221

23-
When Envoy receives a hostname that matches such a pattern, it will compute the routing hash based on the hostname and find the corresponding ClickHouse server on the hash ring based on the computed hash. Assuming that there is no ongoing change to the service (e.g. server restarts, scale out/in), Envoy will always choose the same ClickHouse server to connect to.
22+
To pin a workload to a replica, set the `session_id` query parameter on the HTTPS interface. The proxy parses the request and uses consistent hashing on the `session_id` to select a replica, so all requests sharing the same `session_id` are routed to the same server — until the cluster topology changes.
2423

25-
Note the original hostname will still use `LEAST_CONNECTION` load balancing, which is the default routing algorithm.
24+
```bash
25+
echo 'SELECT hostName()' | curl \
26+
-H 'X-ClickHouse-User: default' -H 'X-ClickHouse-Key: <password>' \
27+
'https://<host>:8443/?session_id=my-workload-1' -d @-
28+
```
2629

27-
## Limitations of Replica-aware routing {#limitations-of-replica-aware-routing}
30+
Every request carrying `session_id=my-workload-1` lands on the same replica. A different `session_id` value hashes independently and may land on the same or a different replica — the mapping is consistent, but you do not choose *which* replica a given value maps to.
31+
32+
## Subdomain-based routing (deprecated) {#subdomain-based-routing-deprecated}
33+
34+
:::danger Deprecated
35+
The subdomain-based mechanism below is **deprecated** and is no longer enabled on new services. It does not scale (each sticky endpoint requires its own TLS certificate). Use the [HTTP-based `session_id` method](#http-based-routing) instead.
36+
:::
37+
38+
Previously, enabling replica-aware routing allowed a wildcard subdomain on top of the service hostname. For a service with the host name `abcxyz123.us-west-2.aws.clickhouse.cloud`, any hostname matching `*.sticky.abcxyz123.us-west-2.aws.clickhouse.cloud` (e.g. `aaa.sticky.abcxyz123.us-west-2.aws.clickhouse.cloud`) was hashed by Envoy to a consistent replica. The original hostname continued to use `LEAST_CONNECTION` load balancing, the default routing algorithm.
39+
40+
## Limitations of replica-aware routing {#limitations-of-replica-aware-routing}
2841

2942
### Replica-aware routing doesn't guarantee isolation {#replica-aware-routing-does-not-guarantee-isolation}
3043

31-
Any disruption to the service, e.g. server pod restarts (due to any reason like a version upgrade, crash, vertical scaling up, etc.), server scaled out / in, will cause a disruption to the routing hash ring. This will cause connections with the same hostname to land on a different server pod.
44+
Any disruption to the service server pod restarts (version upgrade, crash, vertical scaling), or scale out / in — changes the routing hash ring. This causes requests sharing the same `session_id` to land on a different server pod.
3245

3346
### Replica-aware routing doesn't work out of the box with private link {#replica-aware-routing-does-not-work-out-of-the-box-with-private-link}
3447

35-
Customers need to manually add a DNS entry to make name resolution work for the new hostname pattern. It is possible that this can cause imbalance in the server load if customers use it incorrectly.
48+
When using the deprecated subdomain method, customers need to manually add a DNS entry to make name resolution work for the new hostname pattern. It is possible that this can cause imbalance in the server load if customers use it incorrectly.
49+
50+
### Replica-aware routing requires the HTTP protocol {#replica-aware-routing-requires-http}
51+
52+
Sticky routing is keyed on the `session_id` query parameter, which only exists on the HTTP/HTTPS interface. The native binary protocol carries no such parameter for the proxy to hash on, so replica-aware routing is not available over the native protocol. Native-protocol clients must move the relevant workload to the HTTP interface to use this feature.
3653

3754
## Configuring replica-aware routing {#configuring-replica-aware-routing}
3855

39-
To enable Replica-aware routing, please contact [our support team](https://clickhouse.com/support/program).
56+
To enable replica-aware routing, please contact [our support team](https://clickhouse.com/support/program).

0 commit comments

Comments
 (0)