Commit Graph

279 Commits

Author SHA1 Message Date
alexey-milovidov
bfe17d7dca
Merge pull request #16358 from azat/dist-insert-fix
Fix async Distributed INSERT w/ prefer_localhost_replica=0 and internal_replication
2020-10-26 05:07:35 +03:00
Azat Khuzhin
edc8d6e5e7 Fix async Distributed INSERT w/ prefer_localhost_replica=0 and internal_replication 2020-10-25 14:27:06 +03:00
Azat Khuzhin
72d7b6117e Use total_memory_tracker when there is no other MemoryTracker object.
This should significantly reduce the MemoryTracking drift, test shows
that there is 0 drift after query storm (100 queries, via http/tcp/tcp
in one session).

TL;DR;

To track memory, clickhouse creates memory tracker object for each
thread **explicitly**, but until it is not created the memory
allocations are not under account.
There should not be lot of allocations w/o memory tracker, since most of
the time it is created early enough, but even this maybe enough to
trigger some problems.

Plus sometimes it is not possible to create it, for example some 3d
party library does not allow to do this explicitly:
- for example before #15740 allocations from librdkafka threads,
- or even worse, poco threads, they don't have any routines to do this.
This won't be a problem for `MemoryTracking` metric if the deallocation
will be done from the same thread w/o memory tracker (or vise versa),
but this is not always true.

NOTE, that this will slow down per-thread allocations w/o memory
tracker, since before this patch there were no memory tracking for them
while now they will be accounted in total_memory_tracker, and for
total_memory_tracker max_untracked_memory is always reached.
But this should not be significant.
2020-10-23 21:07:52 +03:00
Alexey Milovidov
b26e979e5c Added TODOs + minor adjustments 2020-10-21 01:13:41 +03:00
alexey-milovidov
2b00b5391a
Merge pull request #11844 from Enmk/AES_encrypt_decrypt
encrypt and decrypt functions
2020-10-20 22:57:35 +03:00
alexey-milovidov
b4f0e08369
Merge pull request #16158 from ClickHouse/minimal-ui
Added minimal web UI
2020-10-20 11:57:56 +03:00
Alexey Milovidov
3be41e55a7 Add comments 2020-10-20 04:08:30 +03:00
Alexey Milovidov
9ae144dc69 Edit comment 2020-10-20 04:05:29 +03:00
Alexey Milovidov
9b57f7cdc9 Minor changes 2020-10-20 03:39:24 +03:00
Alexey Milovidov
f8fef7eff6 Minor changes 2020-10-20 03:32:50 +03:00
Alexey Milovidov
a554ca5e62 Added /play handler; added a test 2020-10-20 03:28:33 +03:00
Alexey Milovidov
0af87e9598 Advancements and adjustments 2020-10-20 02:37:10 +03:00
Alexey Milovidov
f229185bee Comments and corrections 2020-10-19 22:25:58 +03:00
Alexey Milovidov
7b4a537538 Added minimal web UI 2020-10-19 21:29:51 +03:00
Alexey Milovidov
5e502c52b3 Merge branch 'master' into AES_encrypt_decrypt 2020-10-14 16:30:23 +03:00
Denis Glazachev
6eec447a64 Merge branch 'master' into ldap-any-user-authentication
* master: (189 commits)
  Fix ugly links in docs
  Update Internals.cpp
  Whitespace
  Fix ugliness in docs
  better
  better backticks
  Try fix tests.
  Fetch helper image before run
  Fetch helper image before run
  Fetch helper image before run
  Update version_date.tsv after release 20.7.4.11
  Update version_date.tsv after release 20.8.4.11
  Update 01515_with_global_and_with_propagation.sql
  fix compilation error
  Supress pvs
  Update version_date.tsv after release 20.9.3.45
  Add missed file
  fix thread restart for parallel quorum inserts
  Update openssl
  Fix race in openssl
  ...
2020-10-14 16:46:37 +04:00
Alexey Milovidov
7d97c8b053 Remove useless code 2020-10-07 11:21:32 +03:00
Denis Glazachev
44916af70a Merge branch 'master' into ldap-any-user-authentication
* master: (279 commits)
  Convert to python3 (#15007)
  update en and ru docs: add 128/256 types (#15515)
  Drop unused code for numeric_limits<int128> in MergeTreeDataSelectExecutor (#15519)
  Fix comment
  More defaults on defaults
  Recursive defaults
  Fix bash
  Update ActionsVisitor.cpp
  Don't add memcpy for sanitizers builds
  Fix gRPC build scripts.
  Neutrialize thinlto's memcpy libcall gen.
  Revert "Add fno-builtin-memcpy"
  Throw an error when a single parameter is passed to ReplicatedMergeTree instead of ignoring it
  Update SECURITY.md
  Update tsan_suppressions.txt
  Update ActionsVisitor.cpp
  remove unrelated changes
  Update SECURITY.md
  fixes
  Update ActionsVisitor.cpp
  ...
2020-10-03 00:45:57 +04:00
tavplubix
4578d89819
Merge pull request #15348 from ClickHouse/replicate_default_args
Continuation of #14791
2020-09-28 18:53:02 +03:00
Alexander Tokmakov
34addcf61f add review suggestions 2020-09-26 22:18:28 +03:00
Denis Glazachev
8f2c23e6de Merge branch 'master' into ldap-any-user-authentication
* master: (224 commits)
  Update in.md
  Add a test for embedded configs
  Allow to run without /proc/self/maps
  Update adopters.md
  More convenient
  Enable embedded configs for AArch64
  More results
  More handy
  More handy
  Added a comment
  Adjustments
  Adjustments
  Adjustments
  Added new results
  Step 1: make adding hardware benchmark results more convenient
  Revert "Avoid deadlocks in Log/TinyLog"
  Fix MSan report in QueryLog
  add some disabled tests from arcadia to skip_list.json
  Update skip_list.json
  Bump CI. [2]
  ...

# Conflicts:
#	docker/test/testflows/runner/Dockerfile
2020-09-25 17:33:50 +04:00
alesapin
97671a1771 Ugly fix for default database race 2020-09-25 14:27:00 +03:00
Alexey Milovidov
1f6e55ff35 Allow to run without /proc/self/maps 2020-09-25 05:03:58 +03:00
Alexey Milovidov
f5eead5b2a Enable embedded configs for AArch64 2020-09-25 04:45:47 +03:00
Alexander Kuzmenkov
679c0988a5 Merge remote-tracking branch 'origin/master' into HEAD 2020-09-22 16:25:52 +03:00
Alexander Kuzmenkov
dde4cf70e1 Merge remote-tracking branch 'origin/master' into HEAD 2020-09-22 14:03:59 +03:00
Alexander Kuzmenkov
478c7309d4
Merge pull request #14843 from ClickHouse/aku/global-pool
Exception on double init of global thread pool
2020-09-22 13:44:39 +03:00
alexey-milovidov
3e0509af69
Merge pull request #13573 from amosbird/rms
specific ReplicatedMergeTree settings
2020-09-21 01:36:33 +03:00
Denis Glazachev
442b1407cf Merge branch 'master' into ldap-any-user-authentication
* master: (375 commits)
  Update type-conversion-functions.md
  Update maxmap.md
  Update maxmap.md
  Update maxmap.md
  Update single_fixed_string_groupby.xml
  Alter remove column properties and TTLs (#14742)
  better fixed string group by support
  Fix incorrect key condition of fixed strings.
  constant output order
  more tests for  #14646
  Maybe fix MSan report in base64
  Proper exception message for wrong number of arguments of CAST
  Added a test
  Fix buffer overflow in "bar" function
  Update convertMySQLDataType.cpp
  Fix clang-tidy
  Remove obsolete code from performance test
  Slightly better code
  Even more
  Even more
  ...

# Conflicts:
#	src/Interpreters/Context.cpp
2020-09-21 00:31:04 +04:00
alexey-milovidov
1474b80ecc
Merge pull request #15008 from ClickHouse/clang-tidy-11-without-enabling
Fix terribly wrong code
2020-09-20 02:00:54 +03:00
alexey-milovidov
c461d782e4
Merge pull request #14929 from ClickHouse/mlock-code-segment
Only mlock code segment
2020-09-19 13:46:49 +03:00
Alexey Milovidov
ef5363b87f Fix terribly wrong code 2020-09-19 02:05:13 +03:00
alexey-milovidov
988b20a32c
Merge pull request #14684 from azat/parallel-distributed_ddl
Allow parallel execution of distributed DDL
2020-09-18 22:18:17 +03:00
Alexander Kuzmenkov
449189dcda Initialize global thread pool before we fetch configs from ZK 2020-09-18 13:47:09 +03:00
Alexey Milovidov
799a675b5d Merge branch 'master' into AES_encrypt_decrypt 2020-09-17 21:42:51 +03:00
Alexey Milovidov
eb523f1a7c Merge branch 'master' into mlock-code-segment 2020-09-17 21:15:09 +03:00
Alexander Kuzmenkov
fb64cf210a straighten the protocol version 2020-09-17 17:37:29 +03:00
Vitaly Baranov
3356d75b23
Merge pull request #13156 from azat/cluster-secure
Secure inter-cluster query execution (with initial_user as current query user) [v3]
2020-09-17 17:11:00 +03:00
Alexey Milovidov
068e8576b7 Corrections 2020-09-17 15:53:52 +03:00
Alexey Milovidov
8bce20076c Only mlock code segment 2020-09-17 15:39:37 +03:00
sundy-li
544b2cb20d add configChanged method for zookeeper
fix logic error && skip reload testkeeper
2020-09-17 13:33:45 +08:00
alexey-milovidov
3d9ec963e9
Update query_masking_rules.xml 2020-09-15 15:49:16 +03:00
alexey-milovidov
018f596d21
Merge pull request #14685 from ClickHouse/remap-executable
Attempt to make performance test more reliable
2020-09-15 15:09:47 +03:00
Azat Khuzhin
0159c74f21 Secure inter-cluster query execution (with initial_user as current query user) [v3]
Add inter-server cluster secret, it is used for Distributed queries
inside cluster, you can configure in the configuration file:

  <remote_servers>
      <logs>
          <shard>
              <secret>foobar</secret> <!-- empty -- works as before -->
              ...
          </shard>
      </logs>
  </remote_servers>

And this will allow clickhouse to make sure that the query was not
faked, and was issued from the node that knows the secret. And since
trust appeared it can use initial_user for query execution, this will
apply correct *_for_user (since with inter-server secret enabled, the
query will be executed from the same user on the shards as on initator,
unlike "default" user w/o it).

v2: Change user to the initial_user for Distributed queries if secret match
v3: Add Protocol::Cluster package
v4: Drop Protocol::Cluster and use plain Protocol::Hello + user marker
v5: Do not use user from Hello for cluster-secure (superfluous)
2020-09-15 01:36:28 +03:00
Alexey Milovidov
7aa3f86ab9 Added config.d file for development 2020-09-14 22:44:20 +03:00
Alexey Milovidov
2ac88ab47d Added config option 2020-09-14 21:08:09 +03:00
Alexey Milovidov
0e73b8acf3 Merge branch 'master' into remap-executable 2020-09-14 20:26:16 +03:00
Vasily Nemkov
30b1831752 Moved default values for query_masking rules for encrypt/decrypt to config.xml 2020-09-14 18:15:07 +03:00
Denis Glazachev
c202364f01
Merge branch 'master' into ldap-any-user-authentication 2020-09-14 18:53:46 +04:00
Vitaly Baranov
421eeeccef Add the section user_directories to the default config. 2020-09-12 23:04:28 +03:00