Commit Graph

18 Commits

Author SHA1 Message Date
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
Alexander Tokmakov
9ef0b00803 fix config 2021-08-20 17:12:42 +03:00
Alexander Tokmakov
59eb3aa9a9 avoid too long waiting for inactive replicas 2021-08-20 15:59:57 +03:00
tavplubix
5a526ed078
Update timeouts.xml 2021-07-30 12:02:13 +03:00
Alexander Tokmakov
0de6e90a34 fix tests 2021-06-21 20:29:32 +03:00
Alexander Tokmakov
c873714698 improve replicated database tests 2021-06-15 23:52:29 +03:00
Alexander Tokmakov
9d8ebd5782 run tests with Replicated database in parallel 2021-06-11 15:28:27 +03:00
Alexander Tokmakov
4d19c84d90 Merge branch 'master' into distributed_ddl_improvements 2021-03-09 20:06:41 +03:00
Alexander Tokmakov
163e27b299 support query and session settings for distributed DDL 2021-03-09 01:57:53 +03:00
Alexander Tokmakov
5070b5b85b detach permanently setting for Replicated db 2021-03-09 00:34:52 +03:00
Alexander Tokmakov
2022b90919 configurable output mode for distributed DDL 2021-03-08 23:35:09 +03:00
Azat Khuzhin
205ebc7cff Tune idle_connection_timeout to avoid reconnects
There may be 1 hour between two different distributed queries in tests
(see [1] and [2]), if this will happen then the connection may be closed
already due to idle_connection_timeout.

  [1]: https://clickhouse-test-reports.s3.yandex.net/21432/572d5862961ffda88125679e3a5ea684c316b223/functional_stateless_tests_(debug).html#fail1
  [2]: https://clickhouse-test-reports.s3.yandex.net/21432/572d5862961ffda88125679e3a5ea684c316b223/functional_stateless_tests_(antlr_debug).html#fail1

Let's tune it to avoid such issues and override other settings in tests.

Another option is to execute SYSTEM RELOAD CONFIG before each test...
2021-03-04 22:48:09 +03:00
Azat Khuzhin
7794ac66d4 Fix flaky tests with distributed queries
There was few attempts to fix this [1] and [2], but it still pops up
sometimes, for example here [3].

  [1]: 009f57fc2f / #11211
  [2]: cdb6bed8b9 / #14198
  [3]: https://clickhouse-test-reports.s3.yandex.net/21318/38be9ff43ac4c46ce6e803fc125d910bde1d4c71/functional_stateless_tests_(release,_databasereplicated).html#fail1

Let's use more generic approach, and do not hide any errors (and see
does increasing timeout will be enough).
2021-03-04 22:48:04 +03:00
Alexander Tokmakov
9c7cf9e92e remove some debug code 2021-02-15 13:26:34 +03:00
Alexander Kuzmenkov
87a306ed23 Enable OpenTelemetry tracing in functional tests 2020-11-19 18:58:33 +03:00
alesapin
f4f104eeb8 Database atomic sync drop detach 2020-10-22 19:18:04 +03:00
Alexander Tokmakov
fb826557b7 Merge branch 'master' into enable_atomic_database_by_default 2020-09-25 02:04:01 +03:00
alesapin
b8861ad6cc Move config files to directories 2020-09-24 13:21:34 +03:00