Commit Graph

89155 Commits

Author SHA1 Message Date
Antonio Andelic
e4cd605edb
Merge pull request #37100 from ucasfl/fix-s3
fix wrong argument in proxy resolver of DiskS3
2022-05-13 10:00:13 +02:00
Azat Khuzhin
f886c4237e tests/integration: fix possible race for iptables user rules inside containers
It is possible for network PartitionManager to work incorrectly, because
of how docker setting up forward to DOCKER-USER chain, it first removes
forward and then adds it back (see [1] and [2]), however this introduce
race for a short period of time, and this is enough for TCP to
retransmit packets, and breaks network PartitionManager.

  [1]: b1e30e8328/libnetwork/iptables/iptables.go (L638)
  [2]: b1e30e8328/libnetwork/firewall_linux.go (L42)

Here are some details from logs for [3]:

    2022-04-27 03:01:00 [ 621 ] DEBUG : Executing query SELECT node FROM distributed_table ORDER BY node on node2 (cluster.py:2879, query_and_get_error)

  [3]: https://s3.amazonaws.com/clickhouse-test-reports/36295/314d553ab14d30df7508814513506ec09c7c7061/integration_tests__asan__actions__[2/3]/integration_run_parallel1_0.log

This query fails, from the server logs:

    2022.04.27 03:01:00.213101 [ 10 ] {19b1719f-8c39-4e3e-b782-aa4c933650f2} <Debug> executeQuery: (from 172.16.5.1:59008) SELECT node FROM distributed_table ORDER BY node
    ...
    2022.04.27 03:01:03.578439 [ 223 ] {19b1719f-8c39-4e3e-b782-aa4c933650f2} <Debug> Connection (node1:9000): Sent data for 2 scalars, total 2 rows in 0.000284672 sec., 6993 rows/sec., 68.00 B (232.15 KiB/sec.), compressed 0.4594594594594595 times to 148.00 B (505.16 KiB/sec.)
    2022.04.27 03:01:03.590637 [ 223 ] {19b1719f-8c39-4e3e-b782-aa4c933650f2} <Debug> MergingSortedTransform: Merge sorted 3 blocks, 2 rows in 3.371592744 sec., 0.5931914533744174 rows/sec., 94.61 B/sec
    2022.04.27 03:01:03.601256 [ 10 ] {19b1719f-8c39-4e3e-b782-aa4c933650f2} <Information> executeQuery: Read 2 rows, 28.00 B in 3.387950542 sec., 0 rows/sec., 8.26 B/sec.
    2022.04.27 03:01:03.601894 [ 10 ] {19b1719f-8c39-4e3e-b782-aa4c933650f2} <Debug> MemoryTracker: Peak memory usage (for query): 334.38 KiB.

And from docker daemon log:

    time="2022-04-27T03:00:59.916693113Z" level=debug msg="form data: {\"AttachStderr\":true,\"AttachStdin\":false,\"AttachStdout\":true,\"Cmd\":[\"iptables\",\"--wait\",\"-I\",\"DOCKER-USER\",\"1\",\"-p\",\"tcp\",\"-s\",\"172.16.5.2\",\"-d\",\"172.16.5.3\",\"-j\",\"DROP\"],\"Container\":\"b75f3b68cda51386bfbb9cceb67e92c4d217a5a1660bde2470b583cb1f4c7fc4\",\"Privileged\":true,\"Tty\":false,\"User\":\"\"}"
    time="2022-04-27T03:01:00.030654116Z" level=debug msg="form data: {\"AttachStderr\":true,\"AttachStdin\":false,\"AttachStdout\":true,\"Cmd\":[\"iptables\",\"--wait\",\"-I\",\"DOCKER-USER\",\"1\",\"-p\",\"tcp\",\"-s\",\"172.16.5.3\",\"-d\",\"172.16.5.2\",\"-j\",\"DROP\"],\"Container\":\"b75f3b68cda51386bfbb9cceb67e92c4d217a5a1660bde2470b583cb1f4c7fc4\",\"Privileged\":true,\"Tty\":false,\"User\":\"\"}"
    ...
    time="2022-04-27T03:01:03.515813984Z" level=debug msg="/usr/sbin/iptables, [--wait -t filter -n -L DOCKER-USER]"
    time="2022-04-27T03:01:03.531106486Z" level=debug msg="/usr/sbin/iptables, [--wait -t filter -C DOCKER-USER -j RETURN]"
    time="2022-04-27T03:01:03.535442346Z" level=debug msg="/usr/sbin/iptables, [--wait -t filter -C FORWARD -j DOCKER-USER]"
    time="2022-04-27T03:01:03.555856911Z" level=debug msg="/usr/sbin/iptables, [--wait -D FORWARD -j DOCKER-USER]"
    time="2022-04-27T03:01:03.564905764Z" level=debug msg="/usr/sbin/iptables, [--wait -I FORWARD -j DOCKER-USER]"
    ...
    time="2022-04-27T03:01:03.706374466Z" level=debug msg="form data: {\"AttachStderr\":true,\"AttachStdin\":false,\"AttachStdout\":true,\"Cmd\":[\"iptables\",\"--wait\",\"-D\",\"DOCKER-USER\",\"-p\",\"tcp\",\"-s\",\"172.16.5.3\",\"-d\",\"172.16.5.2\",\"-j\",\"DROP\"],\"Container\":\"b75f3b68cda51386bfbb9cceb67e92c4d217a5a1660bde2470b583cb1f4c7fc4\",\"Privileged\":true,\"Tty\":false,\"User\":\"\"}"
    time="2022-04-27T03:01:03.968077970Z" level=debug msg="form data: {\"AttachStderr\":true,\"AttachStdin\":false,\"AttachStdout\":true,\"Cmd\":[\"iptables\",\"--wait\",\"-D\",\"DOCKER-USER\",\"-p\",\"tcp\",\"-s\",\"172.16.5.2\",\"-d\",\"172.16.5.3\",\"-j\",\"DROP\"],\"Container\":\"b75f3b68cda51386bfbb9cceb67e92c4d217a5a1660bde2470b583cb1f4c7fc4\",\"Privileged\":true,\"Tty\":false,\"User\":\"\"}"

I've tried multiple ways of fixing this:

- Creating separate chain for rules from PartitionManager (DOCKER-USER-CLICKHOUSE)
  But it is created only once, and docker places new rules on top of the
  FORWARD chain, so it will not work, since it will not receive any
  packets

- Use DOCKER-USER, but replace iptables with a wrapper ([script]), that
  will ignore recreating of a rule for forward to DOCKER-USER, but this
  will not work too, since new docker rules will be created on top of
  FORWARD chain, and so DOCKER-USER will packets.

  [script]:

    if [[ "$*" =~ "-D FORWARD -j DOCKER-USER" ]]; then
        exit 0
    fi
    if [[ "$*" =~ "-I FORWARD -j DOCKER-USER" ]]; then
        if iptables.real iptables -C FORWARD -j DOCKER-USER; then
            exit 0
        fi
    fi

- And the only way to avoid flakiness for this case, is to forbid
  parallel execution for tests with PartitionManager.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-05-13 10:57:24 +03:00
Azat Khuzhin
9899b3f92d tests/integration: remove superfluous import of PartitionManager
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-05-13 10:57:24 +03:00
Azat Khuzhin
0fb9553e1c tests/integration: use no-resolve and verbose for iptables --list
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-05-13 10:57:24 +03:00
Azat Khuzhin
5c1b0f3a76 tests/integration: add logging for NetworkManager
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-05-13 10:57:24 +03:00
mergify[bot]
2fdd305ef1
Merge branch 'master' into array-distance-functions 2022-05-13 07:56:57 +00:00
Rich Raposa
2edc03b3d4
Merge pull request #37170 from DanRoscigno/reorder-example-datasets
Docs: move UK Property and Taxi datasets up
2022-05-12 16:51:22 -06:00
Yakov Olkhovskiy
323cc3597a fix ifdef 2022-05-12 18:37:52 -04:00
Yakov Olkhovskiy
a228d7ac0e variables naming fixed 2022-05-12 18:10:19 -04:00
kssenii
cde5cecc4d One more 2022-05-12 23:57:25 +02:00
Dan Roscigno
8e5a726c87 Empty-Commit 2022-05-12 17:39:29 -04:00
Kseniia Sumarokova
320efb2221
Merge branch 'master' into better-read-from-cache 2022-05-12 23:35:39 +02:00
Kseniia Sumarokova
3fd9517ff8
Merge pull request #37130 from ClickHouse/kssenii-patch-3
Update default remote fs read method in ReadSettings
2022-05-12 23:34:28 +02:00
Maksim Kita
2bf6d9c028
Merge pull request #37154 from azat/context-const
Add const qualifier for few methods from Context
2022-05-12 22:20:39 +02:00
bharatnc
5cdd577153 fix tests 2022-05-12 12:13:37 -07:00
Dan Roscigno
f35c893fbe move UK and Taxi datasets up 2022-05-12 14:32:13 -04:00
Vladimir C
6ca3d61ec9
Merge pull request #37145 from ClickHouse/macosx-guide 2022-05-12 19:49:20 +02:00
Kseniia Sumarokova
6e0a910fcd
Merge branch 'master' into better-read-from-cache 2022-05-12 19:44:18 +02:00
Vitaly Baranov
23322b0bf6 Add async tests. 2022-05-12 19:42:05 +02:00
kssenii
e5466a40fd Make sure async reads from remote fs related internal setting is turned on when needed 2022-05-12 19:00:19 +02:00
Vxider
83c2ee8c8b fix build 2022-05-13 00:28:44 +08:00
Vladimir C
182ba1c605
Merge pull request #36928 from Vxider/wv-fix-multiple-columns 2022-05-12 18:28:15 +02:00
Yakov Olkhovskiy
4b5ed49539 use x509v3 2022-05-12 11:51:00 -04:00
Nikolai Kochetov
f8bd4fa0f0 Remove old comment. 2022-05-12 15:24:36 +00:00
Nikolai Kochetov
77fb1b84ac Enable DNS cache for HTTPSClientSession. 2022-05-12 15:21:29 +00:00
alesapin
e7296a2b28
Merge pull request #36825 from kssenii/cache-fix-1
Removed forceful drop cache command, fix detached status state
2022-05-12 17:18:21 +02:00
Vxider
dc33c3a9bb Merged with master 2022-05-12 23:04:07 +08:00
Kseniia Sumarokova
9fb2df2456
Merge pull request #37105 from Vxider/wv-read
Support SELECT query in WindowView
2022-05-12 16:52:28 +02:00
Yakov Olkhovskiy
859963fb35 more ifdef USE_SSL 2022-05-12 10:45:10 -04:00
HeenaBansal2009
b81dbf3f1c Flamegraph Link update 2022-05-12 07:21:27 -07:00
Alexander Gololobov
1dc3d04837 Removed __SSE2__ flag for PPC64 2022-05-12 16:20:19 +02:00
Azat Khuzhin
5086d8de29 Reload listen_reuse_port/listen_backlog from config
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-05-12 17:05:39 +03:00
Azat Khuzhin
a0ba113e5e Mark Context::getInterserverIOHandler() as const
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-05-12 16:54:01 +03:00
Azat Khuzhin
a04b6ad314 Mark Context::getInterserverCredentials() as const
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-05-12 16:54:01 +03:00
Mikhail Artemenko
12717f2417 fix <Breaking changes> in Meilisearch v0.27.0 2022-05-12 16:51:00 +03:00
Azat Khuzhin
ef921d834d tests: improve 01756_optimize_skip_unused_shards_rewrite_in
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-05-12 16:17:30 +03:00
Azat Khuzhin
e3ff630612 tests: add echo for 01756_optimize_skip_unused_shards_rewrite_in
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-05-12 16:17:30 +03:00
Azat Khuzhin
586eda5242 Fix implicit cast for optimize_skip_unused_shards_rewrite_in
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
Fixes: #37073
2022-05-12 16:17:30 +03:00
Vladimir C
4cb6ca2311
Merge pull request #36970 from ClickHouse/concurrent_join
Follow up for ConcurrentHashJoin
2022-05-12 15:09:29 +02:00
kssenii
7700d51ae4 Update profile events descriptions 2022-05-12 15:02:07 +02:00
kssenii
ef044a5df7 Merge 2022-05-12 14:59:27 +02:00
kssenii
483e056bcc Merge master 2022-05-12 14:58:24 +02:00
Vitaly Baranov
2c92fe21a9 Implement restoring to a bigger or smaller cluster.
Remove backup settings allow_storing_multiple_replicas: now it's always allowed.
2022-05-12 14:55:06 +02:00
kssenii
3c241582db Fix assertions 2022-05-12 14:54:18 +02:00
Yakov Olkhovskiy
7143405fd4 style fix 2022-05-12 08:50:35 -04:00
Kseniia Sumarokova
8b41a58352
Merge pull request #37132 from e-mars/mars-auth-error-fix
Update Exception Message for allowed auth types
2022-05-12 14:48:59 +02:00
Christoph Wurm
f7ca5e8173 Add documentation for JSON data type. 2022-05-12 13:45:54 +01:00
Dmitry Novik
df071bb701
Merge pull request #37129 from ClickHouse/enable-overcommit-for-user
Update documentation and defaults for memory overcommit
2022-05-12 14:38:43 +02:00
Yakov Olkhovskiy
632249eb34 ifdef USE_SSL 2022-05-12 08:34:26 -04:00
Alexander Gololobov
548625a003 Reserve result vectors 2022-05-12 14:33:20 +02:00