Anton Popov
8203bd1ac6
Merge remote-tracking branch 'upstream/master' into HEAD
2021-09-09 14:04:37 +03:00
tavplubix
341a6c51d6
Merging #24866 ( #28691 )
...
* Add StorageSystemISTables.cpp/.h
* Another attempt
* Columns and Views
* Add information schema db and fix information schema 'tables' table
* fix build
* remove copy-paste, add views to system tables
* add test
* fix
* fix_tests
Co-authored-by: Damir Petrov <petrovdamir2235@gmail.com>
Co-authored-by: Damir Petrov <0442a403@verstehen.sas.yp-c.yandex.net>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-09-09 12:37:51 +03:00
Nikita Mikhaylov
4db5062d6b
Merge pull request #28374 from nikitamikhaylov/global-merge-executor
...
Introduced global executor for background MergeTree-related operations
2021-09-09 11:30:21 +03:00
alexey-milovidov
67c16b3a4d
Merge pull request #28761 from azat/uncaught-exception-fix
...
Fix uncaught exception during server termination
2021-09-09 08:57:28 +03:00
Azat Khuzhin
df414ae71c
Fix uncaught exception during server termination
...
Example of a stacktrace:
<details>
```
[ 47463 ] {} <Trace> BaseDaemon: Received signal 15
[ 47463 ] {} <Information> Application: Received termination signal (Terminated)
[ 47462 ] {} <Debug> Application: Received termination signal.
[ 47462 ] {} <Debug> Application: Waiting for current connections to close.
[ 47463 ] {} <Trace> BaseDaemon: Received signal 15
[ 47463 ] {} <Information> Application: Received termination signal (Terminated)
...
[ 47463 ] {} <Trace> BaseDaemon: Received signal -1
[ 47463 ] {} <Fatal> BaseDaemon: (version 21.9.1.1, build id: 63945F58FC2C28ED) (from thread 47462) Terminate called for uncaught exception:
[ 47463 ] {} <Fatal> BaseDaemon: Code: 210. DB::NetException: Connection reset by peer, while writing to socket (10.7.141.42:9000). (NETWORK_ERROR), Stack trace (when copying this message, always include the lines below):
[ 47463 ] {} <Fatal> BaseDaemon:
[ 47463 ] {} <Fatal> BaseDaemon: 0. DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0x94ca99a in /usr/lib/debug/.build-id/63/945f58fc2c28ed.debug
[ 47463 ] {} <Fatal> BaseDaemon: 1. DB::WriteBufferFromPocoSocket::nextImpl() @ 0x10676a3b in /usr/lib/debug/.build-id/63/945f58fc2c28ed.debug
[ 47463 ] {} <Fatal> BaseDaemon: 2. DB::Connection::sendCancel() @ 0x11554701 in /usr/lib/debug/.build-id/63/945f58fc2c28ed.debug
[ 47463 ] {} <Fatal> BaseDaemon: 3. DB::MultiplexedConnections::sendCancel() @ 0x1157e766 in /usr/lib/debug/.build-id/63/945f58fc2c28ed.debug
[ 47463 ] {} <Fatal> BaseDaemon: 4. DB::RemoteQueryExecutor::tryCancel(char const*, std::__1::unique_ptr<DB::RemoteQueryExecutorReadContext, std::__1::default_delete<DB::RemoteQueryExecutorReadContext> >*) @ 0x10392000 in /usr/lib/debug/.build-id/63/945f58fc2c28ed.debug
[ 47463 ] {} <Fatal> BaseDaemon: 5. DB::PipelineExecutor::cancel() @ 0x11697ffe in /usr/lib/debug/.build-id/63/945f58fc2c28ed.debug
[ 47463 ] {} <Fatal> BaseDaemon: 6. DB::QueryStatus::cancelQuery(bool) @ 0x10c19fc8 in /usr/lib/debug/.build-id/63/945f58fc2c28ed.debug
[ 47463 ] {} <Fatal> BaseDaemon: 7. DB::ProcessList::killAllQueries() @ 0x10c1a6ae in /usr/lib/debug/.build-id/63/945f58fc2c28ed.debug
[ 47463 ] {} <Fatal> BaseDaemon: 8. basic_scope_guard<DB::Server::main(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&)::$_18>::~basic_scope_guard() @ 0x95587ad in /usr/lib/debug/.build-id/63/945f58fc2c28ed.debug
[ 47463 ] {} <Fatal> BaseDaemon: 9. DB::Server::main(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0x95528a2 in /usr/lib/debug/.build-id/63/945f58fc2c28ed.debug
[ 47463 ] {} <Fatal> BaseDaemon: 10. Poco::Util::Application::run() @ 0x141e85a3 in /usr/lib/debug/.build-id/63/945f58fc2c28ed.debug
[ 47463 ] {} <Fatal> BaseDaemon: 11. DB::Server::run() @ 0x9541dac in /usr/lib/debug/.build-id/63/945f58fc2c28ed.debug
[ 47463 ] {} <Fatal> BaseDaemon: 12. mainEntryClickHouseServer(int, char**) @ 0x9540153 in /usr/lib/debug/.build-id/63/945f58fc2c28ed.debug
[ 47463 ] {} <Fatal> BaseDaemon: 13. main @ 0x94c569e in /usr/lib/debug/.build-id/63/945f58fc2c28ed.debug
[ 47463 ] {} <Fatal> BaseDaemon: 14. __libc_start_main @ 0x26d0a in /usr/lib/x86_64-linux-gnu/libc-2.31.so
[ 47463 ] {} <Fatal> BaseDaemon: 15. _start @ 0x9490a2a in /usr/lib/debug/.build-id/63/945f58fc2c28ed.debug
[ 47463 ] {} <Fatal> BaseDaemon: (version 21.9.1.1)
[ 47463 ] {} <Trace> BaseDaemon: Received signal 6
[ 11858 ] {} <Fatal> BaseDaemon: ########################################
[ 11858 ] {} <Fatal> BaseDaemon: (version 21.9.1.1, build id: 63945F58FC2C28ED) (from thread 47462) (no query) Received signal Aborted (6)
[ 11858 ] {} <Fatal> BaseDaemon:
[ 11858 ] {} <Fatal> BaseDaemon: Stack trace: 0x7ff04c196ce1 0x7ff04c180537 0xff91f28 0x163304e3 0x1633044c 0x94c60cb 0x10c1a135 0x10c1a6ae 0x95587ad 0x95528a2 0x141e85a3 0x9541dac 0x9540153 0x94c569e 0x7ff04c181d0a 0x9490a2a
[ 11858 ] {} <Fatal> BaseDaemon: 1. raise @ 0x3bce1 in /usr/lib/x86_64-linux-gnu/libc-2.31.so
[ 11858 ] {} <Fatal> BaseDaemon: 2. abort @ 0x25537 in /usr/lib/x86_64-linux-gnu/libc-2.31.so
[ 11858 ] {} <Fatal> BaseDaemon: 3. terminate_handler() @ 0xff91f28 in /usr/lib/debug/.build-id/63/945f58fc2c28ed.debug
[ 11858 ] {} <Fatal> BaseDaemon: 4. std::__terminate(void (*)()) @ 0x163304e3 in /usr/lib/debug/.build-id/63/945f58fc2c28ed.debug
[ 11858 ] {} <Fatal> BaseDaemon: 5. std::terminate() @ 0x1633044c in /usr/lib/debug/.build-id/63/945f58fc2c28ed.debug
[ 11858 ] {} <Fatal> BaseDaemon: 6. ? @ 0x94c60cb in /usr/lib/debug/.build-id/63/945f58fc2c28ed.debug
[ 11858 ] {} <Fatal> BaseDaemon: 7. ? @ 0x10c1a135 in /usr/lib/debug/.build-id/63/945f58fc2c28ed.debug
[ 11858 ] {} <Fatal> BaseDaemon: 8. DB::ProcessList::killAllQueries() @ 0x10c1a6ae in /usr/lib/debug/.build-id/63/945f58fc2c28ed.debug
[ 11858 ] {} <Fatal> BaseDaemon: 9. basic_scope_guard<DB::Server::main(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&)::$_18>::~basic_scope_guard() @ 0x95587ad in /usr/lib/debug/.build-id/63/945f58fc2c28ed.debug
[ 11858 ] {} <Fatal> BaseDaemon: 10. DB::Server::main(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0x95528a2 in /usr/lib/debug/.build-id/63/945f58fc2c28ed.debug
[ 11858 ] {} <Fatal> BaseDaemon: 11. Poco::Util::Application::run() @ 0x141e85a3 in /usr/lib/debug/.build-id/63/945f58fc2c28ed.debug
[ 11858 ] {} <Fatal> BaseDaemon: 12. DB::Server::run() @ 0x9541dac in /usr/lib/debug/.build-id/63/945f58fc2c28ed.debug
[ 11858 ] {} <Fatal> BaseDaemon: 13. mainEntryClickHouseServer(int, char**) @ 0x9540153 in /usr/lib/debug/.build-id/63/945f58fc2c28ed.debug
[ 11858 ] {} <Fatal> BaseDaemon: 14. main @ 0x94c569e in /usr/lib/debug/.build-id/63/945f58fc2c28ed.debug
[ 11858 ] {} <Fatal> BaseDaemon: 15. __libc_start_main @ 0x26d0a in /usr/lib/x86_64-linux-gnu/libc-2.31.so
[ 11858 ] {} <Fatal> BaseDaemon: 16. _start @ 0x9490a2a in /usr/lib/debug/.build-id/63/945f58fc2c28ed.debug
```
</details>
2021-09-08 21:10:34 +03:00
mergify[bot]
64fb384656
Merge branch 'master' into global-merge-executor
2021-09-08 13:15:38 +00:00
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
Nikita Mikhaylov
7c39f84a5e
Merge upstream/master into global-merge-executor (using imerge)
2021-09-06 15:37:18 +00: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
Nikita Mikhaylov
f8d4f04294
Merge upstream/master into global-merge-executor (using imerge)
2021-08-31 11:52:11 +00:00
Maksim Kita
4ebd0ae941
Merge pull request #28102 from ClickHouse/executable-table-function
...
Merging #23192
2021-08-31 12:00:50 +03:00
Nikita Mikhaylov
c4416906c8
done
2021-08-30 19:37:03 +00: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
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
Maksim Kita
6ccdde4a88
Updated TableFunctionExecutable
2021-08-25 22:30:22 +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
alesapin
95cf0634dc
Clickhouse-keeper: renames and comments
2021-08-24 15:30:31 +03:00
Vitaly Baranov
63e8bc1f20
Added new commands BACKUP and RESTORE.
2021-08-23 23:41:45 +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
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
Anton Popov
c3c3a06078
Merge remote-tracking branch 'upstream/master' into HEAD
2021-08-20 01:45:38 +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
tavplubix
08fb4ede35
Update Server.cpp
2021-08-18 19:05:27 +03:00
Alexander Tokmakov
31d75c9c38
fix split build
2021-08-18 15:15:31 +03:00
Vitaly Baranov
fabd7193bd
Code cleanups and improvements.
2021-08-18 14:24:52 +03:00
Vasily Nemkov
51ffc33457
Introduce sessions.
...
This is required to add system.session_log table.
2021-08-18 14:24:52 +03:00
Maksim Kita
6b2c249adc
Updated UserDefinedObjectsLoader
2021-08-18 12:29:52 +03:00
Maksim Kita
8403f381da
Merge pull request #23978 from Realist007/feature/create-simple-lambda-function
...
Feature/create simple lambda function
2021-08-17 21:22:31 +03:00
Alexander Tokmakov
df1a4e90a8
Merge branch 'master' into ncb/server_uuid
2021-08-17 19:42:47 +03:00
Alexander Tokmakov
4d71f65082
fix build
2021-08-17 16:24:14 +03:00
Alexey Milovidov
91faa6d03a
Add more comments to users.xml #27750
2021-08-17 05:01:03 +03:00
Alexander Tokmakov
9e9fa043ca
minor improvements, add test
2021-08-16 21:30:53 +03:00
Realist007
63dfa8559f
Merge branch 'master' into feature/create-simple-lambda-function
2021-08-16 16:56:49 +03:00
Alexander Tokmakov
b324889241
Merge branch 'master' into ncb/server_uuid
2021-08-16 16:18:33 +03:00
mergify[bot]
f7d3c8b554
Merge branch 'master' into feature/enable_part_log
2021-08-15 00:38:14 +00:00
Nikolai Kochetov
d207fbc699
Merge pull request #27152 from qoega/fix-access-gtest-in-arcadia
...
Fix arcadia src/Access gtest
2021-08-13 10:51:29 +03:00
Denis Zhuravlev
c83551ef8e
enable part_log by default
2021-08-12 21:10:20 -03:00
Nikolai Kochetov
5e5a6ff654
Merge branch 'master' into qoega-fix-access-gtest-in-arcadia
2021-08-12 12:02:15 +03:00
mergify[bot]
21cbd50ae1
Merge branch 'master' into materialization_log
2021-08-12 08:53:34 +00:00