Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ jobs:
docker load --input /tmp/docker-deps/deps.tar
fi
images=(
"ghcr.io/getsentry/image-mirror-altinity-clickhouse-server:25.3.6.10034.altinitystable"
"ghcr.io/getsentry/image-mirror-altinity-clickhouse-server:25.3.8.10041.altinitystable"
"ghcr.io/getsentry/image-mirror-confluentinc-cp-kafka:6.2.0"
"ghcr.io/getsentry/image-mirror-confluentinc-cp-zookeeper:6.2.0"
"ghcr.io/getsentry/docker-redis-cluster:7.0.10"
Expand Down Expand Up @@ -283,7 +283,7 @@ jobs:
docker load --input /tmp/docker-deps/deps.tar
fi
images=(
"ghcr.io/getsentry/image-mirror-altinity-clickhouse-server:25.3.6.10034.altinitystable"
"ghcr.io/getsentry/image-mirror-altinity-clickhouse-server:25.3.8.10041.altinitystable"
"ghcr.io/getsentry/image-mirror-confluentinc-cp-kafka:6.2.0"
"ghcr.io/getsentry/image-mirror-confluentinc-cp-zookeeper:6.2.0"
"ghcr.io/getsentry/docker-redis-cluster:7.0.10"
Expand Down Expand Up @@ -458,7 +458,8 @@ jobs:
matrix:
version:
[
"25.3.6.10034.altinitystable",
"25.3.8.10041.altinitystable",
"25.8.16.10001.altinitystable",
]

steps:
Expand Down
2 changes: 1 addition & 1 deletion devservices/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ x-programs:

services:
clickhouse:
image: ghcr.io/getsentry/image-mirror-altinity-clickhouse-server:25.3.6.10034.altinitystable
image: ghcr.io/getsentry/image-mirror-altinity-clickhouse-server:25.3.8.10041.altinitystable
ulimits:
nofile:
soft: 262144
Expand Down
12 changes: 6 additions & 6 deletions docker-compose.gcb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ services:
KAFKA_LOG4J_ROOT_LOGLEVEL: "WARN"
KAFKA_TOOLS_LOG4J_LOGLEVEL: "WARN"
clickhouse:
image: "${CLICKHOUSE_IMAGE:-ghcr.io/getsentry/image-mirror-altinity-clickhouse-server:25.3.6.10034.altinitystable}"
image: "${CLICKHOUSE_IMAGE:-ghcr.io/getsentry/image-mirror-altinity-clickhouse-server:25.3.8.10041.altinitystable}"
hostname: clickhouse.local
extra_hosts:
- "clickhouse.local:127.0.0.1" # Add entry to /etc/hosts file
Expand All @@ -92,7 +92,7 @@ services:
clickhouse-query:
depends_on:
- zookeeper
image: "${CLICKHOUSE_IMAGE:-ghcr.io/getsentry/image-mirror-altinity-clickhouse-server:25.3.6.10034.altinitystable}"
image: "${CLICKHOUSE_IMAGE:-ghcr.io/getsentry/image-mirror-altinity-clickhouse-server:25.3.8.10041.altinitystable}"
hostname: clickhouse-query.local
extra_hosts:
- "clickhouse-query.local:127.0.0.1" # Add entry to /etc/hosts file
Expand All @@ -108,7 +108,7 @@ services:
clickhouse-01:
depends_on:
- zookeeper
image: "${CLICKHOUSE_IMAGE:-ghcr.io/getsentry/image-mirror-altinity-clickhouse-server:25.3.6.10034.altinitystable}"
image: "${CLICKHOUSE_IMAGE:-ghcr.io/getsentry/image-mirror-altinity-clickhouse-server:25.3.8.10041.altinitystable}"
hostname: clickhouse-01.local
extra_hosts:
- "clickhouse-01.local:127.0.0.1" # Add entry to /etc/hosts file
Expand All @@ -125,7 +125,7 @@ services:
clickhouse-02:
depends_on:
- zookeeper
image: "${CLICKHOUSE_IMAGE:-ghcr.io/getsentry/image-mirror-altinity-clickhouse-server:25.3.6.10034.altinitystable}"
image: "${CLICKHOUSE_IMAGE:-ghcr.io/getsentry/image-mirror-altinity-clickhouse-server:25.3.8.10041.altinitystable}"
hostname: clickhouse-02.local
extra_hosts:
- "clickhouse-02.local:127.0.0.1" # Add entry to /etc/hosts file
Expand All @@ -142,7 +142,7 @@ services:
clickhouse-03:
depends_on:
- zookeeper
image: "${CLICKHOUSE_IMAGE:-ghcr.io/getsentry/image-mirror-altinity-clickhouse-server:25.3.6.10034.altinitystable}"
image: "${CLICKHOUSE_IMAGE:-ghcr.io/getsentry/image-mirror-altinity-clickhouse-server:25.3.8.10041.altinitystable}"
hostname: clickhouse-03.local
extra_hosts:
- "clickhouse-03.local:127.0.0.1" # Add entry to /etc/hosts file
Expand All @@ -159,7 +159,7 @@ services:
clickhouse-04:
depends_on:
- zookeeper
image: "${CLICKHOUSE_IMAGE:-ghcr.io/getsentry/image-mirror-altinity-clickhouse-server:25.3.6.10034.altinitystable}"
image: "${CLICKHOUSE_IMAGE:-ghcr.io/getsentry/image-mirror-altinity-clickhouse-server:25.3.8.10041.altinitystable}"
hostname: clickhouse-04.local
extra_hosts:
- "clickhouse-04.local:127.0.0.1" # Add entry to /etc/hosts file
Expand Down
3 changes: 2 additions & 1 deletion docs/source/clickhouse/supported_versions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ ClickHouse supported versions
The following version(s) of Clickhouse have been tested and are known to work
with Snuba:

- 23.8.11.29 (Altinity Stable Build)
- 25.3.8.10041 (Altinity Stable Build)
- 25.8.16.10001 (Altinity Stable Build)

Any version of Clikhouse used outside of this list could potentially work,
but is not guaranteed to work. Some functionality might be broken. Use a
Expand Down
6 changes: 2 additions & 4 deletions snuba/migrations/clickhouse.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
CLICKHOUSE_SERVER_MIN_VERSION = "23.8.11.29"
# Note: SaaS, self-hosted, and sentry dev
# environements should all be on 23.8.11.29
CLICKHOUSE_SERVER_MAX_VERSION = "25.3.6.10034"
CLICKHOUSE_SERVER_MIN_VERSION = "25.3.6.10034"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Min version set to old value instead of new default

Medium Severity

CLICKHOUSE_SERVER_MIN_VERSION is set to "25.3.6.10034" (the old default image version) instead of "25.3.8.10041" (the new default). The PR description explicitly states the min bound is 25.3.8.10041, and the supported versions doc lists 25.3.8.10041 as the lowest supported version—yet the version check in check_clickhouse will accept 25.3.6.10034, which is no longer listed as a supported version.

Fix in Cursor Fix in Web

CLICKHOUSE_SERVER_MAX_VERSION = "25.8.16.10001"
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
}


_attr_columns = [
Column(f"attrs_{type_name}", type_spec) for type_name, type_spec in _TYPES.items()
]
_attr_columns = [Column(f"attrs_{type_name}", type_spec) for type_name, type_spec in _TYPES.items()]


columns: List[Column[Modifiers]] = [
Expand All @@ -40,7 +38,7 @@
MV_QUERY = f"""
SELECT
project_id,
'span',
'span' AS item_type,
toDate(_sort_timestamp) AS date,
retention_days as retention_days,
mapConcat(attr_str_0, attr_str_1, attr_str_2, attr_str_3, attr_str_4, attr_str_5, attr_str_6, attr_str_7, attr_str_8, attr_str_9, attr_str_10, attr_str_11, attr_str_12, attr_str_13, attr_str_14, attr_str_15, attr_str_16, attr_str_17, attr_str_18, attr_str_19) AS attrs_string, -- `attrs_string` Map(String, String),
Expand Down Expand Up @@ -100,7 +98,6 @@


class Migration(migration.ClickhouseNodeMigration):

blocking = False
storage_set_key = StorageSetKey.EVENTS_ANALYTICS_PLATFORM
granularity = "8192"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
}


_attr_columns = [
Column(f"attrs_{type_name}", type_spec) for type_name, type_spec in _TYPES.items()
]
_attr_columns = [Column(f"attrs_{type_name}", type_spec) for type_name, type_spec in _TYPES.items()]


columns: List[Column[Modifiers]] = [
Expand All @@ -40,7 +38,7 @@
MV_QUERY = f"""
SELECT
project_id,
'span',
'span' AS item_type,
toDate(_sort_timestamp) AS date,
retention_days as retention_days,
mapConcat(attr_str_0, attr_str_1, attr_str_2, attr_str_3, attr_str_4, attr_str_5, attr_str_6, attr_str_7, attr_str_8, attr_str_9, attr_str_10, attr_str_11, attr_str_12, attr_str_13, attr_str_14, attr_str_15, attr_str_16, attr_str_17, attr_str_18, attr_str_19) AS attrs_string, -- `attrs_string` Map(String, String),
Expand Down Expand Up @@ -100,7 +98,6 @@


class Migration(migration.ClickhouseNodeMigration):

blocking = False
storage_set_key = StorageSetKey.EVENTS_ANALYTICS_PLATFORM
granularity = "8192"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from snuba.clusters.storage_sets import StorageSetKey
from snuba.migrations import migration, operations
from snuba.migrations.migration_utilities import get_clickhouse_version_for_storage_set
from snuba.migrations.operations import OperationTarget


Expand All @@ -10,13 +11,21 @@ class Migration(migration.ClickhouseNodeMigration):
storage_set_key = StorageSetKey.EVENTS_ANALYTICS_PLATFORM

def forwards_ops(self) -> Sequence[operations.SqlOperation]:
alter_workload = """
ch_version = get_clickhouse_version_for_storage_set(self.storage_set_key, None)

# max_threads was renamed to max_concurrent_threads in ClickHouse 25.8+
if ch_version >= (25, 8):
thread_setting = "max_concurrent_threads"
else:
thread_setting = "max_threads"

alter_workload = f"""
CREATE OR REPLACE WORKLOAD low_priority_deletes
IN all
SETTINGS
priority = 100,
max_requests = 2,
max_threads = 4;
{thread_setting} = 4;
"""

return [
Expand Down
Loading