Commit Graph

1194 Commits

Author SHA1 Message Date
feng lv
ba16896162 add --backslash option for clickhouse-format
fix

fix

fix
2021-03-06 12:29:16 +00:00
feng lv
d208013161 add test
fix

fix

fix
2021-03-06 05:03:53 +00:00
Alexander Kuzmenkov
60cb84d417 more debug info 2021-03-05 20:24:50 +03:00
kssenii
2c080da51b Better 2021-03-05 15:37:43 +00:00
Nikolai Kochetov
a669f7d641 Merge branch 'master' into refactor-actions-dag 2021-03-05 18:21:14 +03:00
kssenii
e0cda1033a More methods 2021-03-05 10:43:47 +00:00
kssenii
dd4a7b6e3d First version 2021-03-05 10:19:01 +00:00
Alexander Kuzmenkov
70dfcdac8d ignore some errors 2021-03-05 12:59:50 +03:00
Nikolai Kochetov
c481401b0b Fix build. 2021-03-05 12:54:17 +03:00
Alexander Kuzmenkov
7c8d17045c fix frame formatting error 2021-03-05 06:15:20 +03:00
Alexey Milovidov
66f495b690 Fix build 2021-03-04 06:49:46 +03:00
Alexey Milovidov
4e8239e098 Merge branch 'master' into DateTime64_extended_range 2021-03-03 23:43:20 +03:00
feng lv
742e5a05ff fix conflict 2021-03-03 09:38:30 +00:00
alexey-milovidov
a1424bc675
Merge pull request #21365 from azat/clickhouse-stop-kill-wait
clickhouse stop: wait for the server to be killed (process exited)
2021-03-03 02:11:17 +03:00
Azat Khuzhin
41a8c2f8fa clickhouse stop: wait for the server to be killed (process exited)
Since killing doesn't happen instantly, and the start will fail [1]:

    The process with pid = 157 is running.
    Will terminate forcefully.
    Sent kill signal.
    /var/run/clickhouse-server/clickhouse-server.pid file exists and contains pid = 157.
    The process with pid = 157 is already running.
    + for _ in {1..120}
    + clickhouse-client --query 'SELECT 1'
    Code: 210. DB::NetException: Connection refused (localhost:9000)

  [1]: https://clickhouse-test-reports.s3.yandex.net/21318/4327e9e1d1e4c9c3576b00f41a8444237549dffd/functional_stateful_tests_(debug).html#fail1
2021-03-02 09:45:03 +03:00
feng lv
cbeb2853fb improve clickhouse-format
fix

fix error word
2021-02-28 11:34:25 +00:00
Azat Khuzhin
0e68fc67aa Add other distributed_ddl settings into config.xml as an example 2021-02-28 05:45:12 +03:00
Azat Khuzhin
dfd1c73b31 Load dictionaries before starting accepting connections and DDLWorker 2021-02-28 05:45:12 +03:00
Alexey Milovidov
ac4d3b504e Allow to start up with modified binary under gdb 2021-02-26 20:15:11 +03:00
Vasily Nemkov
2d03d330bc Extended range of DateTime64 to years 1925 - 2238
The Year 1925 is a starting point because most of the timezones
switched to saner (mostly 15-minutes based) offsets somewhere
during 1924 or before. And that significantly simplifies implementation.

2238 is to simplify arithmetics for sanitizing LUT index access;
there are less than 0x1ffff days from 1925.

* Extended DateLUTImpl internal LUT to 0x1ffff items, some of which
  represent negative (pre-1970) time values.
  As a collateral benefit, Date now correctly supports dates up to 2149
  (instead of 2106).
* Added a new strong typedef ExtendedDayNum, which represents dates
  pre-1970 and post 2149.
* Functions that used to return DayNum now return ExtendedDayNum.
* Refactored DateLUTImpl to untie DayNum from the dual role of being
  a value and an index (due to negative time). Index is now a different
  type LUTIndex with explicit conversion functions from DatNum, time_t,
  and ExtendedDayNum.
* Updated DateLUTImpl to properly support values close to epoch start
  (1970-01-01 00:00), including negative ones.
* Reduced resolution of DateLUTImpl::Values::time_at_offset_change
  to multiple of 15-minutes to allow storing 64-bits of time_t in
  DateLUTImpl::Value while keeping same size.
* Minor performance updates to DateLUTImpl when building month LUT
  by skipping non-start-of-month days.
* Fixed extractTimeZoneFromFunctionArguments to work correctly
  with DateTime64.
* New unit-tests and stateless integration tests for both DateTime
  and DateTime64.
2021-02-24 17:08:35 +02:00
tavplubix
103d569885
Merge branch 'master' into fix_force_drop_materialized_view 2021-02-20 20:41:03 +03:00
tavplubix
a697b578bc
Merge pull request #16193 from ClickHouse/database_replicated
DatabaseReplicated: continuation of #10485
2021-02-20 19:39:34 +03:00
alexey-milovidov
e336abad1c
Merge pull request #20981 from azat/http-client-reset-uncaught-exception
Fix uncaught exception when HTTP client goes away
2021-02-20 16:30:04 +03:00
Azat Khuzhin
5d36ceaaee Fix WriteBufferFromHTTPServerResponse usage in odbc-bridge 2021-02-20 10:15:38 +03:00
alexey-milovidov
b4196c8e68
Merge pull request #20168 from ClickHouse/in-memory-compression
Compression for Memory tables
2021-02-20 09:49:37 +03:00
alexey-milovidov
4390cb3d73
Update config.xml 2021-02-20 09:49:02 +03:00
Alexander Tokmakov
5cfd687dfb fix 2021-02-19 19:22:47 +03:00
Ivan
414f470c79
Make Poco HTTP Server zero-copy again (#19516)
* Refactoring: part 1

* Refactoring: part 2

* Handle request using ReadBuffer interface

* Struggles with ReadBuffer's

* Fix URI parsing

* Implement parsing of multipart/form-data

* Check HTTP_LENGTH_REQUIRED before eof() or will hang

* Fix HTTPChunkedReadBuffer

* Fix build and style

* Fix test

* Resist double-eof

* Fix arcadian build
2021-02-19 15:51:26 +03:00
Alexander Tokmakov
cd91ec8de1 fix 2021-02-18 17:13:23 +03:00
Alexander Tokmakov
13ae988eff make force_drop_table work with materialized view 2021-02-17 17:23:07 +03:00
Alexander Tokmakov
bf6f64a3fb Merge branch 'master' into database_replicated 2021-02-16 01:28:19 +03:00
Alexander Tokmakov
9c7cf9e92e remove some debug code 2021-02-15 13:26:34 +03:00
Alexey Milovidov
ddb2cbcf6d Merge branch 'master' into in-memory-compression 2021-02-14 04:32:41 +03:00
alesapin
f80137626a
Merge pull request #19580 from ClickHouse/in_memory_raft
In memory coordination inside ClickHouse
2021-02-13 10:19:23 +03:00
alexey-milovidov
2fe2190a20
Merge pull request #19721 from azat/buffer-profile
Add separate config directive for Buffer profile
2021-02-13 02:43:41 +03:00
alesapin
5f32f65211 Merge branch 'master' into in_memory_raft 2021-02-11 23:09:29 +03:00
Alexey Milovidov
4d650a2a56 Adjust config 2021-02-11 16:41:21 +03:00
Alexey Milovidov
58f1d4d910 Add comment to config 2021-02-11 16:41:21 +03:00
Alexander Kuzmenkov
2571dac984
Merge pull request #20111 from ClickHouse/aku/window-prototype
RANGE OFFSET window frame
2021-02-11 10:39:21 +03:00
alexey-milovidov
8553a65ef8
Merge pull request #20281 from ClickHouse/aku/fuzzer-changed-settings
print changed settings in fuzzer when the server dies
2021-02-11 03:26:01 +03:00
Azat Khuzhin
935870b2c2 Add separate config directive for Buffer profile
If you push data via Buffer engine then all your queries will be done
from one user, however this is not always desired behavior, since this
will not allow to limit queries with max_concurrent_queries_for_user and
similar.
2021-02-10 21:40:26 +03:00
alexey-milovidov
76ccec2885
Fix XML 2021-02-10 16:39:59 +03:00
Alexander Kuzmenkov
87e5218c91
Update Client.cpp 2021-02-10 16:29:33 +03:00
Alexander Kuzmenkov
41a3cd978e print changed settings in fuzzer when the server dies 2021-02-10 14:18:11 +03:00
filimonov
beb5912b4f
Add example of client configuration adjusemtents 2021-02-10 10:02:35 +01:00
alesapin
9667bdcbd2 Merge branch 'master' into in_memory_raft 2021-02-09 16:06:31 +03:00
alesapin
d5ee7d33e9 Merge branch 'master' into in_memory_raft 2021-02-08 10:30:31 +03:00
madianjun
198a8d3b27 Drop helping tables when the whole table is done in clickhouse-copier 2021-02-08 10:54:03 +08:00
Nicolae Vartolomei
203cafa9b6 Mark functions as pure virtual to fix missing vtable pointer error
```
Undefined symbols for architecture x86_64:
  "vtable for DB::IModel", referenced from:
      DB::IModel::IModel() in Obfuscator.cpp.o
  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture x86_64
clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
```
2021-02-07 14:58:37 +00:00
alexey-milovidov
ed5a81ab59
Merge pull request #20078 from abyss7/better-read-buffers-4
LimitReadBuffer: check that position always advances
2021-02-07 07:33:08 +03:00
alesapin
011109c82a
Merge pull request #17348 from xjewer/alex/CLICKHOUSE-606_deduplication_UUID
CLICKHOUSE-606: query deduplication based on parts' UUID
2021-02-05 22:47:34 +03:00
Alexander Kuzmenkov
6824f13a35 tmp 2021-02-05 12:13:19 +03:00
Ivan Lezhankin
ee0ff755e2 Check that position always advances 2021-02-04 17:46:46 +03:00
Vladimir Chebotarev
f106d58c05 Minor fix. 2021-02-04 10:41:47 +03:00
Alexander Kuzmenkov
f31d2206a7 more fuzzing and less bugs 2021-02-03 15:50:25 +03:00
Alexander Kuzmenkov
bb45c5a8ff Merge remote-tracking branch 'origin/master' into HEAD 2021-02-03 12:13:23 +03:00
Alexander Kuzmenkov
a164abf23e add frame fuzzing and one query that fails under msan 2021-02-03 09:42:54 +03:00
Aleksei Semiglazov
921518db0a CLICKHOUSE-606: query deduplication based on parts' UUID
* add the query data deduplication excluding duplicated parts in MergeTree family engines.

query deduplication is based on parts' UUID which should be enabled first with merge_tree setting
assign_part_uuids=1

allow_experimental_query_deduplication setting is to enable part deduplication, default ot false.

data part UUID is a mechanism of giving a data part a unique identifier.
Having UUID and deduplication mechanism provides a potential of moving parts
between shards preserving data consistency on a read path:
duplicated UUIDs will cause root executor to retry query against on of the replica explicitly
asking to exclude encountered duplicated fingerprints during a distributed query execution.

NOTE: this implementation don't provide any knobs to lock part and hence its UUID. Any mutations/merge will
update part's UUID.

* add _part_uuid virtual column, allowing to use UUIDs in predicates.

Signed-off-by: Aleksei Semiglazov <asemiglazov@cloudflare.com>

address comments
2021-02-02 16:53:39 +00:00
alesapin
9979181c02 Merge branch 'master' into in_memory_raft 2021-02-02 17:05:20 +03:00
alexey-milovidov
f5dc38a33c
Merge pull request #19584 from azat/client-complete-error-codes
client: more suggestions
2021-02-02 11:05:17 +03:00
alesapin
d265e3b419 Less timeouts 2021-02-02 11:02:25 +03:00
alexey-milovidov
8c0ec5105b
Add a patch from @FishermanZzhang, #19952 2021-02-02 06:53:11 +03:00
Azat Khuzhin
37797fdf5b Merge remote-tracking branch 'upstream/master' into client-complete-error-codes 2021-02-02 00:14:53 +03:00
alesapin
f6a8c90be2 Fix config path 2021-02-01 18:12:00 +03:00
alesapin
a8d30bedea Missed config file 2021-02-01 17:16:37 +03:00
alesapin
365bf65f5a Fix install script 2021-02-01 17:14:59 +03:00
alesapin
57c9b6c864 Fix build without nuraft 2021-02-01 16:18:17 +03:00
alesapin
0aca40d8cb Merge branch 'master' into in_memory_raft 2021-02-01 14:30:11 +03:00
Alexey Milovidov
b74b76f681 clickhouse-benchmark: add --reconnect option 2021-01-31 12:36:55 +03:00
Alexey Milovidov
30e1db7f47 Merge branch 'master' into azat-client-complete-error-codes 2021-01-31 00:01:47 +03:00
alexey-milovidov
a9d9a8f3a9
Update Suggest.cpp 2021-01-30 01:21:51 +03:00
alesapin
e4f9a4ea65 Merge branch 'master' into in_memory_raft 2021-01-29 15:56:54 +03:00
Azat Khuzhin
585874bf46 tests: add a test for clickhouse-client autocompletion
v2: Increase timeout for 01676_clickhouse_client_autocomplete
    https://github.com/ClickHouse/ClickHouse/pull/19584#discussion_r565727175

v3: Disable 01676_clickhouse_client_autocomplete in unbundled build (arcadia)

    autocomplete does not have to work fully unbundled build (since it lack
    of replxx).

    Similar to bd523a0aff

v4: set expect timeout back to 1 and increase total timeout to 20 sec
v4: set expect timeout back to 3 and increase total timeout to 22 (3*X+1) sec
2021-01-29 07:50:08 +03:00
Alexander Kuzmenkov
d72b302b97
Update Client.cpp 2021-01-28 23:16:35 +03:00
Azat Khuzhin
86f80105cb client/suggest: add policy 2021-01-28 23:16:06 +03:00
Azat Khuzhin
212d5082b4 client/suggest: add macros 2021-01-28 23:16:06 +03:00
Azat Khuzhin
1c68bf8545 client/suggest: add other metrics 2021-01-28 23:16:06 +03:00
Azat Khuzhin
a2bab85b78 client/suggest: set system_events_show_zero_values for query 2021-01-28 23:16:06 +03:00
Azat Khuzhin
b57452446b client/suggest: add error code names 2021-01-28 23:16:06 +03:00
Alexander Kuzmenkov
f799b332d6 Merge remote-tracking branch 'origin/master' into HEAD 2021-01-28 14:52:55 +03:00
Alexander Kuzmenkov
3f305cecc3 add empty line after error messages in client 2021-01-27 22:52:18 +03:00
alesapin
a33963e211 Better raft server startup 2021-01-27 20:54:25 +03:00
alesapin
6441d3200b Merge branch 'master' into in_memory_raft 2021-01-26 14:14:39 +03:00
alesapin
97b9dba460 Multinode config 2021-01-25 17:10:18 +03:00
Vitaly Baranov
813b2bcc73
Merge pull request #17211 from traceon/ldap-role-mapping
LDAP group to local role mapping support
2021-01-25 15:39:42 +03:00
alesapin
dea4b5009b Some server initialization 2021-01-25 15:29:12 +03:00
alesapin
173b6fefdf Merge branch 'master' into in_memory_raft 2021-01-25 12:03:28 +03:00
Alexey Milovidov
8d335b1490 Allow to enable or disable watchdog via env var 2021-01-23 23:58:36 +03:00
Alexander Kuzmenkov
ccf332ea7e Don't dwell on the past in query fuzzer
When we remember too many query fragments, just clean the database
and start collecting it anew. Hopefully this should make the fuzzer more
aggressive.
2021-01-22 20:15:31 +03:00
alesapin
c1e36cfe70 Something working 2021-01-22 19:04:57 +03:00
Alexander Kuzmenkov
2eba7413e1 remove extra newline 2021-01-22 02:42:24 +03:00
Alexander Kuzmenkov
eb7b87ee8d update tests 2021-01-21 21:01:32 +03:00
Alexander Kuzmenkov
ec8ff21526 Reconnect after client errors 2021-01-21 17:28:46 +03:00
Alexander Kuzmenkov
4d16dead0f Merge remote-tracking branch 'origin/master' into HEAD 2021-01-19 20:34:01 +03:00
Alexander Kuzmenkov
6fefc29f39 comment 2021-01-19 20:25:28 +03:00
Alexander Kuzmenkov
847a4e5d7c Merge remote-tracking branch 'origin/master' into HEAD 2021-01-19 20:22:03 +03:00
Alexander Kuzmenkov
f5931a2289
Merge pull request #19236 from ClickHouse/aku/echo-leading
Make `-- { echo }` hint preserve leading comments
2021-01-19 20:20:58 +03:00
Alexander Kuzmenkov
1bd0c25bf0 Consolidate the test hint handling
Before it was handled in like five places with two of them disabled by a
flag and the others not disabled. Hard to navigate.
2021-01-19 01:40:30 +03:00
Alexander Kuzmenkov
20ef3d7b06 Merge commit '7fa7ea2c935776a3cd9670661739ecaaed80a6c4' into HEAD 2021-01-18 23:26:48 +03:00
Alexander Kuzmenkov
d0922e2985 Merge remote-tracking branch 'origin/master' into tmp 2021-01-18 23:23:49 +03:00
Denis Glazachev
30ab2830e0 Merge branch 'master' into ldap-role-mapping
* master: (605 commits)
  DOCSUP-4710: Added support numeric parameters in number and string data types (#18696)
  DOCSUP-5604: Edit and translate to Russian (#18929)
  Update version_date.tsv after release 21.1.2.15
  Usability improvement of clickhouse-test
  Update jit_large_requests.xml
  Update README.md
  Update images.json
  Make symbolizers available in fuzzer Docker image
  Update Dragonbox
  Speed up aggregate function sum
  Fix MSan report in Kerberos library
  Fix MSan error in rocksdb #19213
  Add more Fuzzer tasks
  Fixes
  Update comment for curl dependency for aws
  Disable curl for mariadb-connector-c (it is not required)
  Fix TSan
  Skip test for ANTLR
  DistributedBlockOutputStream: add more comments
  DistributedBlockOutputStream: Remove superfluous brackets for string construction
  ...
2021-01-18 22:55:05 +04:00
Alexander Kuzmenkov
b2547e99a0 whitespace 2021-01-18 15:18:29 +03:00
Alexander Kuzmenkov
c153268da7 Make -- { echo } hint preserve leading comments. 2021-01-18 15:15:46 +03:00
Alexey Milovidov
3289078ead Merge branch 'master' into aggressive-fuzz-new-tests 2021-01-18 14:04:00 +03:00
Alexander Kuzmenkov
f3e112766f cleanup 2021-01-18 12:49:56 +03:00
Alexey Milovidov
950bfb3ec6 Allow change max_server_memory_usage without restart 2021-01-16 18:33:46 +03:00
Alexey Milovidov
6cd352fbe3 Remove unneeded change from #18977 2021-01-16 18:08:21 +03:00
alexey-milovidov
6885890006
Merge pull request #18977 from ClickHouse/fix_deadlock_on_shutdown
Fix rare deadlock at shutdown of BackgroundSchedulePool
2021-01-16 18:05:59 +03:00
Alexey Milovidov
52a05f4b5d Extreme fuzzing of newly added tests 2021-01-16 18:03:32 +03:00
Alexander Kuzmenkov
9d6730a846 small fixes 2021-01-16 00:33:53 +03:00
Alexander Kuzmenkov
765aa4d4e3 rewrote everything again 2021-01-15 23:30:44 +03:00
Alexander Kuzmenkov
c9628386fc more fixes 2021-01-15 01:39:43 +03:00
Alexander Kuzmenkov
4c2c083387 strip leading whitespace 2021-01-15 00:27:36 +03:00
Alexander Kuzmenkov
1abb554d2b test fixes 2021-01-14 23:47:52 +03:00
Alexander Kuzmenkov
d53da04e6f without debug 2021-01-14 18:38:27 +03:00
Alexander Kuzmenkov
8be081e3c0 with debug 2021-01-14 18:35:52 +03:00
Alexander Kuzmenkov
48509a85d3 comment woes 2021-01-14 01:04:19 +03:00
Alexander Kuzmenkov
c2a1373720 Merge remote-tracking branch 'origin/master' into tmp 2021-01-13 22:30:08 +03:00
Alexander Kuzmenkov
703731c547 something works 2021-01-13 22:29:52 +03:00
alexey-milovidov
f9586ab891
Update play.html 2021-01-13 17:29:11 +03:00
alexey-milovidov
10c162c0fa
Update play.html 2021-01-13 17:28:56 +03:00
sundy-li
046a4b605c Support metaKey 2021-01-13 13:53:17 +00:00
Alexander Tokmakov
3cc7e1407d revert previous fix 2021-01-12 21:45:44 +03:00
Alexey Milovidov
24ded3c1c1 Allow clickhouse-local to run without system tables 2021-01-10 14:12:22 +03:00
Alexey Milovidov
79a38c4c6e Fix hang at shutdown in clickhouse-local 2021-01-10 06:35:05 +03:00
Alexey Milovidov
32f10c38d9 Query Fuzzer: return fail fast semantics 2021-01-09 08:30:23 +03:00
alexey-milovidov
6e34a0b71e
Merge pull request #17855 from spongedu/complete_sysemlog_table_doc
1. Refine documents for system log table; 2. fix a link error in config.xml
2021-01-08 09:49:01 +03:00
Alexey Milovidov
6dcc779978 Merge branch 'master' into spongedu-complete_sysemlog_table_doc 2021-01-07 22:27:37 +03:00
Alexey Milovidov
cea1b7dba5 Fix build 2021-01-07 16:37:06 +03:00
Alexey Milovidov
6f481d7512 Add integrity checks for ClickHouse binary 2021-01-07 05:56:57 +03:00
Denis Glazachev
8893fbcf8e Rename {username} to {user_name}
Add caching/checking of search_params
Adjust comments/doc
Use special authentication logic from ExternalAuthenticators::checkLDAPCredentials
2021-01-06 07:40:47 +04:00
Alexey Milovidov
aff4ba7726 Slightly better 2021-01-06 04:03:07 +03:00
Alexey Milovidov
8d34f76d76 Slightly better 2021-01-06 03:58:31 +03:00
Denis Glazachev
c8cf51b81e Merge branch 'master' into ldap-role-mapping
* master: (620 commits)
  Add test for some possible ambiguities in syntax
  Update PushingToViewsBlockOutputStream.h
  [For #18707] MySQL compatibility: support DIV and MOD operators
  Mark another flaky test
  Remove some headers
  Mark some TestFlows as flaky
  Fix error
  Fix errors
  One more test
  Arcadia does not support distributed queries
  Add a test for #14974
  Added a test from #15641
  More robust stateful test
  Update tests
  Remove bad code in HashJoin
  Update test
  Don't allow conversion between UUID and numeric types
  Remove pink screen with confusing questions about Kerberos
  Do not throw from Parser
  Fix the unexpected behaviour of show tables when antlr parser enabled (#18431)
  ...

# Conflicts:
#	programs/server/config.xml
#	src/Access/Authentication.cpp
#	src/Access/Authentication.h
2021-01-06 03:42:02 +04:00
Alexey Milovidov
895ec0976b Break query fuzzer even more 2021-01-06 00:34:08 +03:00
Alexey Milovidov
7f074cb491 Remove half of strange code from query fuzzer 2021-01-06 00:20:39 +03:00
Alexey Milovidov
8ecbfe701c Miscellaneous 2021-01-05 23:32:42 +03:00
Alexey Milovidov
5573c3b61e Fix error in Fuzzer 2021-01-05 23:32:05 +03:00
Alexey Milovidov
1bd6605373 Remove strange code from Fuzzer 2021-01-05 23:30:00 +03:00
Alexey Milovidov
a06f03b9b3 Query Fuzzer: fix some cultural issues 2021-01-05 23:23:26 +03:00
alexey-milovidov
2a37f5f687
Merge pull request #18740 from ClickHouse/remove-incl
Remove obsolete "incl" from /etc/metrika.xml; correct links in config
2021-01-05 03:31:18 +03:00
Alexey Milovidov
063360511a Remove obsolete "incl" from /etc/metrika.xml; correct links in config 2021-01-04 21:01:17 +03:00
Alexey Milovidov
6ec602ad67 Fix build 2021-01-04 19:38:43 +03:00
Alexey Milovidov
735a8ed74c Fix build 2021-01-04 17:08:58 +03:00
Alexey Milovidov
e4894fc18e Replace "sleep" 2021-01-04 17:05:06 +03:00
John Skopis
9bcc5a6175 Support interserver credential rotation
Restarting a server instance to change the interserver password results
in many replicas being out of sync until all clusters are using the new
credential.

This commit adds dynamic credential loading for both the client
(Replicated* tables) and server (InterserverIOHTTPHandler).

This commit also adds the ability to rotate credentials, i.e. accept more
than one credential during a credential change.

state0 (no auth):

    <interserver_http_credentials />

state1 (auth+allow_empty migration):

    <interserver_http_credentials>
        <user>admin</user>
        <password>222</password>
        <allow_empty>true</allow_empty>
    </interserver_http_credentials>

state2 (auth+new admin password migration):

    <interserver_http_credentials>
        <user>admin</user>
        <password>333</password>
        <users>
            <admin>222</admin>
        </users>
    </interserver_http_credentials>
2021-01-04 09:59:09 +00:00
Alexey Milovidov
38d982b199 Merge branch 'master' into harmful 2021-01-04 04:06:46 +03:00
Azat Khuzhin
c0fa2fb6e6 compressor: remove extra check for seeking of input 2020-12-31 22:13:04 +03:00
Nikita Mikhaylov
f27aa148e0
Merge branch 'master' into parallel-parsing-input-format 2020-12-31 06:16:43 +04:00
Alexey Milovidov
98687ff8f4 Merge branch 'master' into harmful 2020-12-31 02:25:28 +03:00
Alexey Milovidov
611caf1778 Send fatal logs in all tests 2020-12-30 22:12:24 +03:00
Nikita Mikhailov
8e31ce4a5c Merge branch 'master' of github.com:ClickHouse/ClickHouse into parallel-parsing-input-format 2020-12-30 18:22:11 +03:00
alexey-milovidov
c281a17869
Merge pull request #18619 from azat/utils-pull
Small utils improvements (check-marks and compressor)
2020-12-30 17:45:43 +03:00
alexey-milovidov
aa67966932
Update Compressor.cpp 2020-12-30 17:45:09 +03:00
Vitaly Baranov
a84887aff8
Merge pull request #15988 from traceon/ldap-cache-login
Allow caching of successful "bind" attempts to LDAP server for configurable period of time
2020-12-30 17:24:45 +03:00
Nikita Mikhailov
c5f92e5096 better formatfactory 2020-12-30 06:07:30 +03:00
Azat Khuzhin
30508c1b50 compressor: return 0 on --help 2020-12-29 23:09:00 +03:00
Azat Khuzhin
e02c328453 compressor: remove superfluous warning suppressions 2020-12-29 23:08:29 +03:00
Azat Khuzhin
009a281894 compressor: using for program_options namespace 2020-12-29 23:07:35 +03:00
Azat Khuzhin
3362c8fc40 compressor: add seek support while reading compressed file
Useful to debug .bin files
2020-12-29 23:06:40 +03:00
Azat Khuzhin
a71c193062 compressor: add positional arguments support for input/output 2020-12-29 23:05:54 +03:00
Nikita Mikhailov
2b90b4e01d Merge branch 'master' of github.com:ClickHouse/ClickHouse into parallel-parsing-input-format 2020-12-29 22:47:06 +03:00
Nikita Mikhailov
2dde73f700 better 2020-12-28 19:52:54 +03:00
Nikita Mikhailov
c3288c3fbf Merge branch 'master' of github.com:ClickHouse/ClickHouse into parallel-parsing-input-format 2020-12-28 15:09:37 +03:00
Alexander Kuzmenkov
2905f70cce fix aliases in partition by/order by 2020-12-28 12:56:38 +03:00
Alexey Milovidov
bb4668fd6e Fix bug: no newline after exception message in some tools 2020-12-24 00:18:08 +03:00
Vitaliy Zakaznikov
c12695ceed Merge branch 'master' of https://github.com/traceon/ClickHouse into ldap-role-mapping 2020-12-23 09:38:08 -05:00
Alexey Milovidov
fdc8950fbe Do not use watchdog when server is run from tty 2020-12-23 17:31:10 +03:00
Vitaliy Zakaznikov
26ca04c92d Merge branch 'master' of https://github.com/traceon/ClickHouse into ldap-cache-login 2020-12-23 08:17:12 -05:00
Alexander Kuzmenkov
51b2329295
Merge branch 'master' into aku/window-prototype 2020-12-23 09:26:11 +03:00
alexey-milovidov
29ad7b6d94
Merge pull request #13516 from ClickHouse/watchdog
If server was terminated by OOM killer, print message in log.
2020-12-23 05:35:44 +03:00
Nikita Mikhailov
dcfbe782c6 Merge branch 'master' of github.com:ClickHouse/ClickHouse into parallel-parsing-input-format 2020-12-23 05:20:22 +03:00
Nikita Mikhaylov
015bd56516
Merge pull request #18201 from nikitamikhaylov/clickhouse-install
Try to make clickhouse-install work on mac
2020-12-23 01:37:15 +03:00
Alexander Kuzmenkov
3da533766d clang-tidy....... 2020-12-22 10:25:45 +03:00
Alexander Kuzmenkov
919172f9ee more fuzzer fixes 2020-12-22 07:16:56 +03:00
Alexander Kuzmenkov
dadfc76f8f fix the fuzzer 2020-12-22 07:02:39 +03:00
Alexey Milovidov
f9012b12fb Proper implementation 2020-12-22 06:01:51 +03:00
Alexey Milovidov
932ade2cb8 Merge branch 'master' into watchdog 2020-12-22 03:10:15 +03:00
nikitamikhaylov
8501c7a831 better 2020-12-22 02:03:08 +03:00
nikitamikhaylov
cd3a73f9d3 done 2020-12-22 00:47:10 +03:00
Alexey Milovidov
7421a55cc4 Merge branch 'master' into harmful 2020-12-21 23:44:22 +03:00
alexey-milovidov
d66506299f
Merge pull request #18238 from azat/jemalloc-MADV_DONTNEED-runtime-check
MADV_DONTNEED check in runtime for qemu (via patching jemalloc)
2020-12-21 21:07:49 +03:00
Alexey Milovidov
157c66ebdb Merge branch 'master' into harmful 2020-12-21 10:57:50 +03:00
Alexander Kuzmenkov
85c1bc1253 Merge remote-tracking branch 'origin/master' into tmp 2020-12-21 10:46:21 +03:00
Alexey Milovidov
b99634dc5d Merge branch 'master' into harmful 2020-12-21 03:03:10 +03:00
Denis Glazachev
ea7e94f3eb Use 127.0.0.1 as a default listen-host for ODBC bridge 2020-12-21 03:26:31 +04:00
Azat Khuzhin
e379b80d45 MADV_DONTNEED check in runtime for qemu (via patching jemalloc)
qemu does not support MADV_DONTNEED, and by not support it simply ignore
it (i.e. return 0 -- no error).

This issue has been "fixed" in #15590, however it just
terminates the process, and completely breaks clickhouse under qemu
(see also #15174).

But there is no need in such strong protection, we can stop using
madvise in jemalloc if MADV_DONTNEED does not work properly.
And this is what #18169 was tried to do (by override madvise), however
this will break sanitizers, at least TSAN and UBSAN.
The problem there is that sanitizers initialization code uses madvise
(and there is no way to turn this off with TSAN_OPTIONS) and overwritten
madvise function will have sanitizers traits (__tsan_func_entry), while
TSAN is not ready for this, and eventually it SIGSEGV.
Interesting thing is that in the recent clang-12, madvise was replaced
with direct syscall [1].

  [1]: 9f8c4039f2

But it is better to make clickhouse compatible with clang < 12 too, so
instead of override madvise completely, the runtime check was moved into
the jemalloc code [2].

  [2]: https://github.com/ClickHouse-Extras/jemalloc/pull/1
2020-12-19 15:34:12 +03:00
Alexey Milovidov
ecc270605d Fix error (CC @akuzm) 2020-12-19 01:07:52 +03:00
Alexey Milovidov
7805e84b4b Return clickhouse-git-import 2020-12-19 00:19:11 +03:00
Alexey Milovidov
9c3fbc9ac6 Return clickhouse-git-import 2020-12-19 00:04:03 +03:00
Amos Bird
c447628d42
Add connection thread metrics 2020-12-18 15:22:55 +08:00
alexey-milovidov
6a5ce2eea7
Update config.xml 2020-12-18 07:58:56 +03:00
alexey-milovidov
44734a829e
Merge pull request #18207 from ClickHouse/better-config
Better config: example ports, security advices
2020-12-18 06:39:35 +03:00
alexey-milovidov
b4a59aecfe
Update config.xml 2020-12-18 06:39:21 +03:00
Nikita Mikhaylov
b1d1ea0e01
Update Install.cpp 2020-12-18 06:17:23 +03:00
Alexander Kuzmenkov
5e19eaf2f0 Merge remote-tracking branch 'origin/master' into tmp 2020-12-18 03:49:59 +03:00
Alexander Kuzmenkov
157fe3e8b4 some tests + ability to echo the queries 2020-12-18 03:49:18 +03:00
Nikita Mikhaylov
80fae17545
Update Install.cpp 2020-12-18 03:30:01 +03:00
Alexander Kuzmenkov
fc426807a8 formatting & fuzzer support 2020-12-18 03:21:23 +03:00
Nikita Mikhailov
6a55e018e4 Merge branch 'master' of github.com:ClickHouse/ClickHouse into parallel-parsing-input-format 2020-12-18 02:25:32 +03:00
nikitamikhaylov
d3c64e7528 cleanup 2020-12-18 02:12:38 +03:00
nikitamikhaylov
b04a7e8212 style 2020-12-18 02:12:38 +03:00
nikitamikhaylov
faee2b30bd better 2020-12-18 02:12:38 +03:00
nikitamikhaylov
aeef47fd71 first try 2020-12-18 02:12:38 +03:00
Nikita Mikhaylov
aa7793e38f
Merge pull request #18084 from nikitamikhaylov/fix-arcadia-third
Try to fix Arcadia
2020-12-18 01:54:42 +03:00
Alexey Milovidov
92d8840ae5 Better config: example ports, security advices 2020-12-18 00:31:09 +03:00
Alexey Milovidov
f7f8ff8758 Merge branch 'master' into sigaltstack 2020-12-17 22:16:30 +03:00
Alexey Milovidov
08cc43da81 Merge branch 'master' into harmful 2020-12-17 21:08:48 +03:00
Denis Glazachev
53db7e564c Do transformations based on prefix only 2020-12-17 18:29:05 +04:00
alesapin
66228f4054
Merge pull request #18065 from ClickHouse/fix_watch_race_testkeeper
Remove dead list watches from TestKeeperStorage
2020-12-17 10:15:30 +03:00
Alexey Milovidov
bef492240c Apply harmful library only for clickhouse binary 2020-12-17 06:45:46 +03:00
Alexey Milovidov
7f280bef37 Merge branch 'master' into sigaltstack 2020-12-17 05:09:10 +03:00
Nikolai Kochetov
d96ca3fb8d Fixing build. 2020-12-16 20:11:32 +03:00
nikitamikhaylov
5521abba1e fix boost 2020-12-16 15:57:42 +03:00
alesapin
ea4d11cb73 Wait for connections to special servers 2020-12-16 13:04:46 +03:00
nikitamikhaylov
b5436547ff thread tests 2020-12-15 00:56:48 +03:00
nikitamikhaylov
12e624fd9a fix tests 2020-12-15 00:56:48 +03:00
nikitamikhaylov
f7ac8bf542 rebase and fix tests 2020-12-15 00:56:48 +03:00
nikitamikhaylov
67766034f2 disable progress bar with parallel_formatting 2020-12-15 00:56:47 +03:00
nikitamikhaylov
57705f5b73 delete and fix strange code 2020-12-15 00:56:47 +03:00
Nikita Mikhaylov
161c921dba fix build 2020-12-15 00:56:47 +03:00
Nikita Mikhaylov
5a47928431 save 2020-12-15 00:56:47 +03:00
Nikita Mikhaylov
0e31424c92 save changes 2020-12-15 00:56:47 +03:00
Nikita Mikhaylov
82888b5c4d fix build 2020-12-15 00:56:47 +03:00
Nikita Mikhaylov
3bc1affd21 remove CSV restriction 2020-12-15 00:56:47 +03:00
Alexey Milovidov
149431ffc3 Automatic support for dark theme in Play interface 2020-12-13 20:54:57 +03:00
alexey-milovidov
04e222f6f3
Merge pull request #17986 from azat/fwd-decl
More forward declaration for generic headers
2020-12-13 01:12:05 +03:00
Alexey Milovidov
2ad5c8eed3 Allow server to start with TestKeeper port in development environment 2020-12-13 00:45:23 +03:00
Azat Khuzhin
5b3ab48861 More forward declaration for generic headers
The following headers are pretty generic, so use forward declaration as
much as possible:
- Context.h
- Settings.h
- ConnectionTimeouts.h
(Also this shows that some missing some includes -- this has been fixed)

And split ConnectionTimeouts.h into ConnectionTimeoutsContext.h (since
module part cannot be added for it, due to recursive build dependencies
that will be introduced)

Also remove Settings from the RemoteBlockInputStream/RemoteQueryExecutor
and just pass the context, since settings was passed only in speicifc
places, that can allow making a copy of Context (i.e. Copier).

Approx results (How much units will be recompiled after changing file X?):

- ConnectionTimeouts.h
  - mainline: 100

- Context.h:
  - mainline: ~800
  - patched:  415

- Settings.h:
  - mainline: 900-1K
  - patched:  440 (most of them because of the Context.h)
2020-12-12 17:43:10 +03:00
Alexander Kuzmenkov
fb1221148d
Merge pull request #17748 from azat/custom-TLD
Add ability to use custom TLD list
2020-12-11 12:42:19 +03:00
Azat Khuzhin
352a1eea34 Use new top_level_domains_path 2020-12-09 21:08:31 +03:00
Azat Khuzhin
840a21d073 Add top_level_domains_path for easier overriding 2020-12-09 21:08:31 +03:00
Azat Khuzhin
916cbd6610 Add ability to use custom TLD list
v2: Add a note that top_level_domains_lists aren not applied w/o restart
v3: Remove ExtractFirstSignificantSubdomain{Default,Custom}Lookup.h headers
v4: TLDListsHolder: remove FIXME for dense_hash_map (this is not significant)
2020-12-09 21:08:22 +03:00
alesapin
850f903d40 Merge branch 'master' into complete_zk_api 2020-12-09 18:18:38 +03:00
alesapin
0dd9c720f4 Better server 2020-12-09 11:58:41 +03:00
alesapin
758dcd1972 Separate factory for test keeper handlers 2020-12-09 11:45:36 +03:00
alexey-milovidov
8ff30b87a6
Merge pull request #15930 from kitaisreal/clickhouse-client-and-local-added-queries-file-parameter
Clickhouse client and clickhouse local added queries-file parameter
2020-12-08 21:44:19 +03:00
Vitaly Baranov
f6f336ac78
Merge pull request #17888 from vitlibar/retrieve-logs-from-grpc
Retrieve logs from grpc
2020-12-08 20:54:02 +03:00
alesapin
3d0dbbe411 Fix build 2020-12-08 17:49:18 +03:00
alexey-milovidov
ab10cb4bf9
Merge pull request #17707 from ClickHouse/quota-by-x-forwarded-for
Allow quotas to be keyed by proxy-forwarded IP address; add support for PROXY protocol
2020-12-08 14:48:05 +03:00
Vitaly Baranov
559afe028f Retrieve logs from grpc library and pass them to our logging system. 2020-12-07 23:39:55 +03:00
Vitaly Baranov
76afe58bbf Fix commenting in the server config. 2020-12-07 21:50:55 +03:00
Maksim Kita
963ee5211b Added queries-file parameter. Fixed code review issues 2020-12-07 19:29:17 +03:00
Maksim Kita
f5d1a9e59a Clickhouse client and local added queries-file parameter 2020-12-07 19:29:17 +03:00
Alexey Milovidov
1ed329017b Merge branch 'master' into quota-by-x-forwarded-for 2020-12-07 18:22:19 +03:00
Maksim Kita
ee33323d1e Added tests 2020-12-07 11:35:44 +03:00
spongedc
5914e6e451 Refine documents for system log table, and fix a link error in config.xml 2020-12-07 16:04:29 +08:00
alesapin
0c43246216 Merge branch 'master' into complete_zk_api 2020-12-07 10:24:55 +03:00
Maksim Kita
97cfaea182 Clickhouse-benchmark added query parameter 2020-12-06 11:53:02 +03:00
Alexey Milovidov
1e943babcc Do not add empty query to browser history 2020-12-03 23:20:09 +03:00