Skip to content

Instantly share code, notes, and snippets.

View Slach's full-sized avatar
💭
deep diving into kuberntes

Eugene Klimov Slach

💭
deep diving into kuberntes
View GitHub Profile
@Slach
Slach / Dockerfile
Last active February 6, 2024 23:20
clickhouse with odbc, for docker-compose and kubernetes
FROM yandex/clickhouse-server:${CLICKHOUSE_VERSION:-latest}
USER root
ARG UBUNTU_NAME=focal
ARG UBUNTU_VERSION=20.04
RUN echo "Begin ODBC install" && \
#MySQL repo
wget -qO- "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xa4a9406876fcbd3c456770c88c718d3b5072e1f5" | apt-key add - && \
echo "deb http://repo.mysql.com/apt/ubuntu/ ${UBUNTU_NAME} mysql-8.0" >/etc/apt/sources.list.d/mysql-oracle.list && \
@Slach
Slach / docker-compose.yml
Last active July 8, 2021 12:56
system.detached_parts not works after change default storage policy to multi-disk
version: "3"
services:
clickhouse:
image: yandex/clickhouse-server:${CLICKHOUSE_VERSION:-latest}
@Slach
Slach / docker-compose.yaml
Created April 26, 2021 04:32
create MySQL8 working dictionary sample
version: "3"
services:
mysql8:
image: mysql:${MYSQL_VERSION:-latest}
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=1
volumes:
- ./mysql8_table.sql:/docker-entrypoint-initdb.d/mysql8_table.sql
- ./mysql8_log_queries.conf:/etc/mysql/conf.d/mysql8_log_queries.conf
clickhouse:
@Slach
Slach / airports.parquet
Last active February 23, 2021 14:13
ClickHouse Grafana Webinar
This file has been truncated, but you can view the full file.
@Slach
Slach / README.md
Last active January 25, 2021 11:04
DROP TABLE default.any_non_exists_name ON CLUSTER SYNC - doesn't work

ClickHouse 21.1.2 DROP TABLE default.test_repl ON CLUSTER 'default' SYNC failed for Atomic

Steps for reproduce

bash -x ./reproduce.sh

Expected Result

successfull drop table

@Slach
Slach / Corefile
Last active November 19, 2020 11:47
clickhouse multiple PTR DNS response
. {
hosts /etc/example.com {
reload "200ms"
fallthrough
}
forward . 127.0.0.11
log
}
@Slach
Slach / README.md
Last active November 5, 2020 14:47
bloom_index

Steps to reproduce

for v in 20.3 20.4 20.5 20.6 20.7 20.8 20.9 20.10 latest; do CLICKHOUSE_VERSION=$v bash -c "docker-compose down && docker-compose up -d clickhouse && sleep 1 && docker-compose exec clickhouse bash -c 'clickhouse-client -mn < /queries.sql | grep -i bloom'"; done
@Slach
Slach / README.md
Last active October 2, 2020 09:54
20.8 reproduce DB::Exception: Cannot add simple transform to empty Pipe

Exception raised when we don't have data in table and have dictGet in WHERE clause steps to reproduce

docker-compose up -d
docker-compose exec clickhouse bash -c "clickhouse-client -mn --echo < /var/lib/clickhouse/user_files/success_query.sql"
docker-compose exec clickhouse bash -c "clickhouse-client -mn --echo < /var/lib/clickhouse/user_files/failed_query.sql"
diff failed_query.sql success_query.sql
less clickhouse-server.log
This file has been truncated, but you can view the full file.
2020.08.24 13:44:17.013175 [ 1 ] {} <Information> : Starting ClickHouse 20.4.9.110 with revision 54434, PID 1
2020.08.24 13:44:17.019023 [ 1 ] {} <Information> Application: starting up
2020.08.24 13:44:17.028135 [ 1 ] {} <Debug> Application: rlimit on number of file descriptors is 1048576
2020.08.24 13:44:17.028193 [ 1 ] {} <Debug> Application: Initializing DateLUT.
2020.08.24 13:44:17.028247 [ 1 ] {} <Debug> Application: Setting up /var/lib/clickhouse/tmp/ to store temporary data in it
2020.08.24 13:44:17.028938 [ 1 ] {} <Debug> Application: Configuration parameter 'interserver_http_host' doesn't exist or exists and empty. Will use 'chi-test-cluster-for-alerts-default-0-0-0.chi-test-cluster-for-alerts-default-0-0.test.svc.cluster.local' as replica host.
2020.08.24 13:44:17.033778 [ 1 ] {} <Debug> ConfigReloader: Loading config '/etc/clickhouse-server/users.xml'
2020.08.24 13:44:17.041703 [ 1 ] {} <Warning> Access(disk): File /var/lib/clickhouse/access/users.list doesn't exist
@Slach
Slach / README.md
Last active August 11, 2020 17:13
Reproduce fail dictionary loading on server startup in ClickHouse 20.6

steps to reproduce

docker-compose down
docker-compose run clickhouse