Commit Graph

359 Commits

Author SHA1 Message Date
Mike Kot
6ea574525c Small fixes regarding the review 2021-03-03 16:51:41 +03:00
Pavel Kruglov
780a65e3a0 Merge branch 'master' of github.com:ClickHouse/ClickHouse into system-parts-requested-columns-fill 2021-03-02 10:29:26 +03:00
Kruglov Pavel
caaa0c5e86
Restart tests. 2021-03-01 13:25:20 +03:00
Anmol Arora
2d9b524bdd Fill only requested columns when querying system.parts & system.parts_columns 2021-02-28 01:58:38 +00:00
alexey-milovidov
2ac5c4b71b
Merge pull request #20996 from azat/system-stack-trace-diagnostics
Add log message when stacktrace cannot be obtained for thread
2021-02-21 22:18:13 +03:00
Azat Khuzhin
7c04f15c80 Add log message when stacktrace cannot be obtained for thread
This is to provide better diagnostics for 01051_system_stack_trace
failure [1].

  [1]: https://clickhouse-test-reports.s3.yandex.net/20881/866dfaec793f764dc9ba167d3ac9f6521b9b3381/functional_stateless_tests_(release,_wide_parts_enabled).html#fail1
2021-02-20 09:13:00 +03:00
Alexander Tokmakov
8097532cb7 Merge branch 'master' into database_replicated 2021-02-18 17:42:06 +03:00
Vitaly Baranov
d357fb9129 Fix reading from the table system.quota_usage. 2021-02-16 23:54:05 +03:00
Alexander Tokmakov
bf6f64a3fb Merge branch 'master' into database_replicated 2021-02-16 01:28:19 +03:00
alesapin
8da9f150de Fix race in system.parts 2021-02-09 11:51:17 +03:00
Alexander Tokmakov
5e0cbfe972 Merge branch 'master' into database_replicated 2021-02-08 23:01:12 +03:00
Alexander Tokmakov
78c1d69b8c better code 2021-02-08 22:36:17 +03:00
tavplubix
b31891ce2b
Merge pull request #20105 from nicelulu/zookeeper_table_in_query
Supports system.zookeeper path IN query.
2021-02-08 15:01:56 +03:00
Alexander Tokmakov
7ce0ef2561 show clusters for replicated db 2021-02-08 12:14:17 +03:00
zhangxiao871
581495ae23 Supports system.zookeeper path IN query. 2021-02-05 14:45:28 +08:00
kreuzerkrieg
1cc9e03d0c return DiskType instead of String IDisk::getType() as in the rest of storage interfaces 2021-02-04 10:01:21 +02:00
Alexander Tokmakov
d010f97db0 Merge branch 'master' into database_replicated 2021-02-03 20:13:25 +03:00
tavplubix
dbcddbcebd
Merge pull request #19770 from stigsb/materializemysql_system_parts
Show MaterializeMySQL tables in system.parts
2021-02-02 11:43:42 +03:00
Maksim Kita
d0151de4bb
Merge pull request #19608 from kreuzerkrieg/Add_IStoragePolicy_interface
Add IStoragePolicy interface
2021-02-02 11:03:20 +03:00
alesapin
2aa8a6304b
Merge pull request #15450 from CurtizJ/fix-ttl-group-by
Fix some cases of TTL expressions
2021-02-01 16:48:07 +03:00
robot-clickhouse
cd82eed093 Auto version update to [21.3.1.1] [54448] 2021-02-01 12:50:56 +03:00
Stig Bakken
bedc472bb0 Show MaterializeMySQL tables in system.parts 2021-02-01 16:59:10 +08:00
Alexey Milovidov
5a92e633a1 Remove useless headers 2021-01-29 10:37:46 +03:00
Anton Popov
e5125b8c73 add comments and test for compatibility 2021-01-28 02:39:15 +03:00
Anton Popov
a8f3078ce9 Merge remote-tracking branch 'upstream/master' into HEAD 2021-01-27 19:48:55 +03:00
kreuzerkrieg
29a2ef3089 Add IStoragePolicy interface 2021-01-26 10:55:28 +02:00
Alexander Tokmakov
3bd4d97353 Merge branch 'master' into database_replicated 2021-01-25 14:19:04 +03:00
alesapin
fe133580ee
Merge pull request #19346 from azat/system.parts-_state-fix
Fix system.parts _state column
2021-01-25 10:11:19 +03:00
Alexey Milovidov
afc6f2fd8e Add http_referer to client info 2021-01-22 01:55:45 +03:00
alesapin
fe6b964b32 Revert "Revert "Auto version update to [21.2.1.1] [54446]""
This reverts commit 42f63e14b5.
2021-01-21 12:39:46 +03:00
Azat Khuzhin
5f3059555a Fix system.parts _state column
There was LOGICAL_ERROR when querying this column, due to incorrect order:

    SELECT
        *,
        _state
    FROM system.parts

    2021.01.21 10:22:57.731556 [ 22851 ] {02a07c6d-467d-4681-9203-4dc11cc6fbee} <Fatal> : Logical error: 'Invalid Field get from type String to type UInt64'.
2021-01-21 10:41:23 +03:00
Alexander Tokmakov
7f97a11c84 Merge branch 'master' into database_replicated 2021-01-18 17:09:39 +03:00
Anton Popov
15ead18673 Merge remote-tracking branch 'upstream/master' into HEAD 2021-01-12 19:46:10 +03:00
Alexander Tokmakov
ff6c3c75c2 add protection from unsafe allocations 2021-01-12 18:41:24 +03:00
tavplubix
213c653ef8
Merge pull request #17656 from bharatnc/ncb/ddl-worker-queue-table
add  system.distributed_ddl_queue table
2021-01-11 14:59:26 +03:00
Alexey Milovidov
42f63e14b5 Revert "Auto version update to [21.2.1.1] [54446]"
This reverts commit bc2593688e.
2021-01-11 11:32:52 +03:00
robot-clickhouse
bc2593688e Auto version update to [21.2.1.1] [54446] 2021-01-11 11:12:11 +03:00
Alexey Milovidov
c7d4d12f72 Auto version update to [21.1.0] [54445] 2021-01-11 03:51:08 +03:00
Azat Khuzhin
714d5a067a Expose supports_parallel_insert via system.table_engines 2021-01-08 14:57:24 +03:00
bharatnc
1e579ac375 Fixes to code, build and style checks 2021-01-07 11:10:49 -08:00
bharatnc
6f0009ff52 extract cluster_name from DDLQuery 2021-01-07 11:10:41 -08:00
bharatnc
f0ea07b493 DDLLogEntry.parse() to populate query and initiator 2021-01-07 11:10:41 -08:00
bharatnc
9cddd22a7a review fixes 2021-01-07 11:10:41 -08:00
bharatnc
24d67082a9 few more changes and simplification to integration test 2021-01-07 11:10:41 -08:00
bharatnc
c796b0c1cb add exception_status column 2021-01-07 11:10:41 -08:00
bharatnc
9004d4384d Add query_start|finish_time, query_dureation_ms 2021-01-07 11:10:41 -08:00
bharatnc
6da923cbe1 Use tryGetChildren() for Zookeeper 2021-01-07 11:10:41 -08:00
bharatnc
57126d1901 Add values column and fix tests 2021-01-07 11:10:41 -08:00
bharatnc
2a122905f1 Review - initial round of changes 2021-01-07 11:10:41 -08:00
bharatnc
c0d32dee37 DDLWorkerQueueTable - make loop vars a const ref 2021-01-07 11:10:41 -08:00
bharatnc
cc568a1d2c DDLWorkerQueueTable - load distributed_ddl.path from server config 2021-01-07 11:10:40 -08:00
bharatnc
56a8532781 DDLWorkerQueueTable - populate active and finished columns 2021-01-07 11:10:40 -08:00
bharatnc
da174a63d1 DDLWorkerQueueTable - initial attempt to fetch entries from zk 2021-01-07 11:10:40 -08:00
bharatnc
2c1f9e2a77 DDLWorkerQueueTable - add intial scaffolding 2021-01-07 11:10:40 -08:00
Anton Popov
b60c00ba74 refactoring of TTL stream 2020-12-25 18:46:13 +03:00
alexey-milovidov
2c7979dd64
Merge pull request #18379 from vitlibar/fix-filling-table-system-settings-profile-elements
Fix filling table system.settings_profile_elements.
2020-12-23 15:34:00 +03:00
alexey-milovidov
aedb1874af
Fix clang-tidy 2020-12-23 04:40:23 +03:00
Vitaly Baranov
9e31800ebb Fix filling table system.settings_profile_elements. 2020-12-22 23:24:59 +03:00
Alexey Milovidov
b9df795595 Another code for TSan 2020-12-22 11:16:36 +03:00
Alexey Milovidov
838b146b41 Merge branch 'master' into amosbird-stacktracefix 2020-12-21 04:22:31 +03:00
Vitaly Baranov
af3ccb49f1 Show create query for temporary tables in system.tables 2020-12-17 11:42:25 +03:00
Vitaly Baranov
ede755d3bc Show temporary tables in system.columns as tables with empty database. 2020-12-17 11:42:25 +03:00
Vitaly Baranov
d7a3cc8c90 Don't show the "_temporary_and_external_tables" database in system tables
system.databases, system.tables, system.columns.
2020-12-17 11:42:25 +03:00
Alexey Milovidov
7ca86f176c Fix TSan warning in system.stack_trace 2020-12-16 01:43:07 +03:00
Alexey Milovidov
13ac1bee7a Merge branch 'master' into amosbird-stacktracefix 2020-12-15 22:12:49 +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
Amos Bird
04128c33e1
disable TSAN for real 2020-12-12 14:17:48 +08:00
Amos Bird
0aa75e6023
Another try of TSan fix 2020-12-12 13:59:34 +08:00
alexey-milovidov
cfeaff6aa7
Update StorageSystemStackTrace.cpp 2020-12-12 13:59:34 +08:00
alexey-milovidov
b513eeee7f
Another try... 2020-12-12 13:59:34 +08:00
Amos Bird
5e71f4e810
Have to resort to NO_SANITIZE_THREAD 2020-12-12 13:59:34 +08:00
Amos Bird
c4306b5788
Another try of TSan fix 2020-12-12 13:59:34 +08:00
Amos Bird
d0044886ab
fix TSan 2020-12-12 13:59:34 +08:00
Amos Bird
4809b5975a
Fix system.stack_trace in daemon 2020-12-12 13:59:33 +08:00
Alexander Kuzmenkov
d757f32300 Remove some redundant includes to speed up build 2020-12-11 02:58:11 +03:00
Alexey Milovidov
c9aa412151 Allow quotas to be keyed by proxy-forwarded IP address 2020-12-02 00:09:16 +03:00
nikitamikhaylov
72c7cd6693 replace Context& to Settings& 2020-11-25 16:47:32 +03:00
nikitamikhaylov
68bef22fda Merge branch 'master' of github.com:ClickHouse/ClickHouse into merging-sequential-consistency 2020-11-23 16:28:35 +03:00
robot-clickhouse
dc19fba36f Auto version update to [20.13.1.1] [54444] 2020-11-23 10:29:26 +03:00
Nicolae Vartolomei
425dc4b11b Add unique identifiers IMergeTreeDataPart structure
For now uuids are not generated at all, they are present only if the
part is updated manually (as you can see in the integration test).

The only place where they can be seen today by an end user is in
`system.parts` table. I was looking for hiding this column behind an
option but couldn't find an easy way to do that.

Likely this is also required for WAL, but need to think how not to break
compatibility.

Relates to #13574, https://github.com/ClickHouse/ClickHouse/issues/13574

Next 1: In the upcoming PR the plan is to integrate de-duplication based on
these fingerprints in the query pipeline.

Next 2: We'll enable automatic generation of uuids and come up with a
way for conditionally sending uuids when processing distributed queries
only when part movement is in progress.
2020-11-19 13:14:25 +00:00
Alexander Tokmakov
5cdfcfb307 remove other stringstreams 2020-11-09 22:12:44 +03:00
alexey-milovidov
f4ba5f1f9a
Merge pull request #16772 from ClickHouse/fix-stringstream
Fix "server failed to start" error
2020-11-08 14:27:08 +03:00
Alexey Milovidov
5314185e25 Merge branch 'master' into azat-optimize_skip_unused_shards-optimization 2020-11-08 00:17:59 +03:00
Alexey Milovidov
dba57529f8 Merge branch 'master' of github.com:yandex/ClickHouse into fix-stringstream 2020-11-07 22:03:38 +03:00
Alexey Milovidov
fd84d16387 Fix "server failed to start" error 2020-11-07 03:14:53 +03:00
Azat Khuzhin
c057e86040 Fix path masking in system.distribution_queue for multiple nodes 2020-11-06 21:04:50 +03:00
Azat Khuzhin
b2e17916e4 Mask password in data_path in the system.distribution_queue 2020-11-06 00:10:25 +03:00
robot-clickhouse
f7b7854ace Auto version update to [20.12.1.1] [54443] 2020-11-05 21:52:50 +03:00
alexey-milovidov
8a3f38f332
Merge branch 'master' into errorCode-v2 2020-11-04 01:40:41 +03:00
Azat Khuzhin
e07473f1ea Update comment for StorageSystemErrors 2020-10-31 11:29:17 +03:00
alesapin
b34960bffa Merge branch 'master' into system_fetches_table 2020-10-30 11:33:37 +03:00
Azat Khuzhin
3661769e1b Remove some absolute changes for errorCodeToName/system.errors 2020-10-30 09:04:22 +03:00
Azat Khuzhin
ce9897bfd8 Fix readability-container-size-empty in StorageSystemErrors.cpp 2020-10-30 00:07:40 +03:00
Azat Khuzhin
b42f77a791 Covert error codes list to lookup table and drop generation of them. 2020-10-29 10:55:41 +03:00
Azat Khuzhin
b2e2322895 Add system.errors table
Contains error codes with number of times they have been triggered.

Columns:

-   `name` ([String](../../sql-reference/data-types/string.md)) — name of the error (`errorCodeToName`).
-   `code` ([Int32](../../sql-reference/data-types/int-uint.md)) — code number of the error.
-   `value` ([UInt64](../../sql-reference/data-types/int-uint.md)) - number of times this error has been happened.

**Example**

``` sql
SELECT *
FROM system.errors
WHERE value > 0
ORDER BY code ASC
LIMIT 1

┌─name─────────────┬─code─┬─value─┐
│ CANNOT_OPEN_FILE │   76 │     1 │
└──────────────────┴──────┴───────┘
2020-10-29 10:55:38 +03:00
alexey-milovidov
bf3acecf6f
Merge pull request #16032 from Avogar/mysql_bug
Don't touch MySQL database if it's unnecessary
2020-10-29 04:14:26 +03:00
alesapin
6253d1466a Fix comments 2020-10-27 16:09:14 +03:00
alesapin
3d3d246bdc Rename table 2020-10-27 16:07:50 +03:00
alesapin
3824fcb076 Rename file and some tweaks 2020-10-27 15:47:42 +03:00
alesapin
dca35b1913 Add awesome test for fetch 2020-10-27 15:24:10 +03:00