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 / gramework_go1.13.1.go
Created October 13, 2019 05:59
gramework_go1.13.1.go
package main;
import (
grameworklog "github.com/apex/log"
grameworklog_json "github.com/apex/log/handlers/json"
"github.com/gramework/gramework"
)
func InitGramework() (web *gramework.App) {
web = gramework.New()
logger := &grameworklog.Logger{
* ==> Docker <==
* -- Logs begin at Tue 2019-12-24 09:36:37 UTC, end at Tue 2019-12-24 09:41:14 UTC. --
* Dec 24 09:36:55 minikube dockerd[2452]: time="2019-12-24T09:36:55.226032614Z" level=info msg="loading plugin "io.containerd.runtime.v2.task"..." type=io.containerd.runtime.v2
* Dec 24 09:36:55 minikube dockerd[2452]: time="2019-12-24T09:36:55.226276799Z" level=info msg="loading plugin "io.containerd.monitor.v1.cgroups"..." type=io.containerd.monitor.v1
* Dec 24 09:36:55 minikube dockerd[2452]: time="2019-12-24T09:36:55.227344467Z" level=info msg="loading plugin "io.containerd.service.v1.tasks-service"..." type=io.containerd.service.v1
* Dec 24 09:36:55 minikube dockerd[2452]: time="2019-12-24T09:36:55.227435429Z" level=info msg="loading plugin "io.containerd.internal.v1.restart"..." type=io.containerd.internal.v1
* Dec 24 09:36:55 minikube dockerd[2452]: time="2019-12-24T09:36:55.227552987Z" level=info msg="loading plugin "io.containerd.grpc.v1.containers"..." type=io.containerd.grpc.v1
* Dec 24 09:36:55

For try to reproduce run following command in bash

docker-compose down && docker-compose up -d clickhouse && sleep 5 && docker-compose exec clickhouse bash ./reproduce.sh
@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
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
2020.08.24 13:44:17.041877 [ 1 ]
@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
@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 / 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 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 / airports.parquet
Last active February 23, 2021 14:13
ClickHouse Grafana Webinar
This file has been truncated, but you can view the full file.