Commit Graph

1620 Commits

Author SHA1 Message Date
Vitaly Baranov
70c6623036
Merge branch 'master' into governance/session_log 2021-09-07 10:12:54 +03:00
Vitaly Baranov
bcc31f1f3e Remove unnecessary changes. 2021-09-07 01:37:28 +03:00
tavplubix
4780008805
Merge pull request #28533 from azat/MaterializeMySQL-drop-fix
Fix UUID overlap in DROP TABLE for internal DDL from MaterializeMySQL
2021-09-06 12:34:13 +03:00
Azat Khuzhin
bf6ba796f8 Fix UUID overlap in DROP TABLE for internal DDL from MaterializeMySQL
This will fix race with DatabaseCatalog::loadMarkedAsDroppedTables(),
since MaterializeMySQL, and MaterializedMySQLSyncThread in background,
will be started earlier then
DatabaseCatalog::loadMarkedAsDroppedTables() and will move those tables
to metadata_dropped, and after loadMarkedAsDroppedTables() will start
and try to load partially dropped tables and will hit UUID overlap:

    12:02:51.536783 [ 3026034 ] {} <Information> Application: starting up
    12:02:53.019282 [ 3026034 ] {} <Information> DatabaseMaterializeMySQL<Atomic> (mysql): Total 9 tables and 0 dictionaries.
    12:02:53.041699 [ 3026200 ] {} <Debug> mysql.data (7143b65f-6982-4600-b143-b65f6982e600): Loading data parts
    12:02:53.041740 [ 3026200 ] {} <Debug> mysql.data (7143b65f-6982-4600-b143-b65f6982e600): There are no data parts
    12:02:53.620382 [ 3026034 ] {} <Information> DatabaseMaterializeMySQL<Atomic> (mysql): Starting up tables.
    12:03:00.669730 [ 3026183 ] {} <Debug> executeQuery: (internal) /*Materialize MySQL step 1: execute MySQL DDL for dump data*/ DROP TABLE mysql.data
    12:03:00.741894 [ 3026269 ] {} <Information> DatabaseCatalog: Trying load partially dropped table mysql.data (7143b65f-6982-4600-b143-b65f6982e600) from /var/lib/clickhouse/metadata_dropped/mysql.data.7143b65f-6982-4600-b143-b65f6982e600.sql
    12:03:00.742582 [ 3026269 ] {} <Debug> mysql.data (7143b65f-6982-4600-b143-b65f6982e600): Loading data parts
    12:03:00.742650 [ 3026269 ] {} <Debug> mysql.data (7143b65f-6982-4600-b143-b65f6982e600): There are no data parts
    12:03:00.773137 [ 3026034 ] {} <Error> Application: Caught exception while loading metadata: Code: 57, e.displayText() = DB::Exception: Mapping for table with UUID=7143b65f-6982-4600-b143-b65f6982e600 already exists. It happened due to UUID collision, most likely because some not random UUIDs were manually specified in CREATE queries., Stack trace (when copying this message, always include the lines below):
    12:03:01.224557 [ 3026034 ] {} <Error> Application: DB::Exception: Mapping for table with UUID=7143b65f-6982-4600-b143-b65f6982e600 already exists. It happened due to UUID collision, most likely because some not random UUIDs were manually specified in CREATE queries.

Cc: @zhang2014
2021-09-04 10:41:28 +03:00
alesapin
497c225203 Test log level for CI 2021-09-03 13:07:40 +03:00
Vasily Nemkov
109d2f63d0 Fixed tests and minor style issues 2021-08-31 15:39:15 +03:00
alesapin
525999145e
Merge pull request #26791 from ClickHouse/async-reads
Experiment with asynchronous readers
2021-08-31 13:17:45 +03:00
Maksim Kita
4ebd0ae941
Merge pull request #28102 from ClickHouse/executable-table-function
Merging #23192
2021-08-31 12:00:50 +03:00
Alexey Milovidov
ca6f6306f3 Merge branch 'master' into async-reads 2021-08-31 02:52:58 +03:00
alexey-milovidov
ea84b939c2
Merge pull request #28333 from DimasKovas/try_to_fix_arcadia_2_30_08_2021
Try to fix arcadia build
2021-08-30 18:53:14 +03:00
Vasily Nemkov
c902afddde Added system.session_log table
Which logs all the info about LogIn, LogOut and LogIn Failure events.
Additional info that is logged:
- User name
- event type (LogIn, LogOut, LoginFailure)
- Event date\time\time with microseconds
- authentication type (same as for IDENTIFIED BY of CREATE USER statement)
- array of active settings profiles upon login
- array of active roles upon login
- array of changed settings with corresponding values
- client address and port
- interface (TCP\HTTP\MySQL\PostgreSQL, etc.)
- client info (name, version info)
- optional LoginFailure reason text message.

Added some tests to verify that events are properly saved with all necessary info via following interfaces:
- TCP
- HTTP
- MySQL

Known limitations
- Not tested against named HTTP sessions, PostgreSQL and gRPC, hence those are not guaranteed to work 100% properly.
2021-08-30 18:28:28 +03:00
Kseniia Sumarokova
00bea71610
Merge pull request #25251 from kssenii/disk-over-web-server
ClickHouse over web server with static files
2021-08-30 16:18:59 +03:00
Dmitrii Kovalkov
2c8e2c6995 Fix arcadia build 2021-08-30 12:19:13 +03:00
kssenii
a930823518 Fix build 2021-08-29 14:18:04 +00:00
kssenii
fb6ce3b64e Fix build check 2021-08-29 08:53:04 +00:00
kssenii
f27f519aa2 Fix build and add example 2021-08-28 20:35:51 +00:00
Maksim Kita
1a6c2c78c8
Merge pull request #28298 from kitaisreal/odbc-connection-holder-fix-dangling-reference
ODBC connection holder fix dangling reference
2021-08-28 15:28:23 +03:00
Maksim Kita
07d7cda2b0 ODBC connection holder fix dangling reference 2021-08-28 14:11:25 +03:00
Nikolai Kochetov
34f4bd3e72
Merge pull request #28178 from amosbird/projection-fix14
Projection bug fixes and refactoring.
2021-08-27 11:47:46 +03:00
Kseniia Sumarokova
31afd7d09c
Merge pull request #28081 from kssenii/pg-conflict
Support `on conflict` for postgres engine
2021-08-26 16:30:30 +03:00
Amos Bird
0169fce78e
Projection bug fixes and refactoring. 2021-08-26 19:09:31 +08:00
alesapin
47b995467e
Merge pull request #28080 from ClickHouse/some_renames_in_keeper
Clickhouse-keeper: renames and comments
2021-08-26 10:16:21 +03:00
alesapin
e182e2bad2
Merge pull request #28143 from ClickHouse/fix_keeper_jepsen
Fix clickhouse keeper jepsen tests
2021-08-26 10:16:06 +03:00
kssenii
0b66581de2 Fix build 2021-08-25 21:51:43 +00:00
Maksim Kita
6ccdde4a88 Updated TableFunctionExecutable 2021-08-25 22:30:22 +03:00
alesapin
ea5fbbedec Fix clickhouse keeper jepsen tests 2021-08-25 19:15:56 +03:00
Artur Filatenkov
31c7e22bd6 correct style 2021-08-25 18:29:25 +03:00
Filatenkov Artur
884b51116d
Merge branch 'master' into master 2021-08-25 14:34:39 +03:00
Maksim Kita
dc852568c0
Merge pull request #27796 from ClickHouse/create-user-defined-lambda-function
Merging #23978
2021-08-25 10:08:20 +03:00
Maksim Kita
82ba24cd10 Merge branch 'master' into create-user-defined-lambda-function 2021-08-24 19:12:32 +03:00
Nicolae Vartolomei
abc484e89b
Destroy main_config_reloader before shared context.
This tries to fix crash reported in a comment
https://github.com/ClickHouse/ClickHouse/pull/24404#issuecomment-847012002.
2021-08-24 17:06:17 +01:00
kssenii
0ec716292c Postgres ON CONFLICT 2021-08-24 12:37:32 +00:00
alesapin
95cf0634dc Clickhouse-keeper: renames and comments 2021-08-24 15:30:31 +03:00
kssenii
b536653851 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into disk-over-web-server 2021-08-24 07:29:50 +00:00
Vitaly Baranov
63e8bc1f20 Added new commands BACKUP and RESTORE. 2021-08-23 23:41:45 +03:00
Nikita Mikhaylov
fb6462d70a
Merge pull request #27886 from vitlibar/add-separate-constants-for-interfaces
Add separate constants for interfaces LOCAL and TCP_INTERSERVER.
2021-08-23 16:25:01 +03:00
Maksim Kita
2a6aa50d49 Merge branch 'master' into create-user-defined-lambda-function 2021-08-23 11:08:49 +03:00
alexey-milovidov
e620ea15bd
Merge pull request #27900 from amosbird/newf
getServerPort function
2021-08-21 22:40:25 +03:00
Amos Bird
997acdc39e
getPort function 2021-08-21 20:33:36 +08:00
alexey-milovidov
dfb7decc0f
Merge pull request #27903 from ClickHouse/password-usability
Improve usability when user forgot password
2021-08-21 10:27:41 +03:00
kssenii
945e2c4ce5 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into disk-over-web-server 2021-08-20 18:01:23 +00:00
Maksim Kita
5f2b28639f Merge branch 'master' into create-user-defined-lambda-function 2021-08-20 11:53:08 +03:00
Kruglov Pavel
5a282e8947
Merge pull request #27875 from vitlibar/fix-shutdown-named-session-storage
Fix shutdown of NamedSessionStorage.
2021-08-20 11:50:43 +03:00
Alexey Milovidov
2ab97bd621 Improve usability when user forgot password #27750 2021-08-20 11:08:21 +03:00
Vitaly Baranov
3ab1177d7e Add separate constants for interface LOCAL and TCP_INTERSERVER. 2021-08-19 23:04:36 +03:00
Vitaly Baranov
c257cd61e5
Merge pull request #27817 from vitlibar/use-sessions-more
Use sessions more
2021-08-19 22:51:08 +03:00
Vitaly Baranov
9fecda940d Fix shutdown of NamedSessionStorage. 2021-08-19 17:27:03 +03:00
tavplubix
9ef45d92c2
Merge pull request #27755 from ClickHouse/ncb/server_uuid
Merging  #20089
2021-08-19 14:59:18 +03:00
Vitaly Baranov
3b09640d94 Use sessions more. 2021-08-19 02:22:09 +03:00
Vitaly Baranov
65ee9a1272
Merge pull request #26864 from vitlibar/refactor-sessions
Introduce sessions
2021-08-19 01:38:51 +03:00