Added new tests for session_log and fixed the inconsistency between login and logout.#52958
Added new tests for session_log and fixed the inconsistency between login and logout.#52958tavplubix merged 12 commits intoClickHouse:masterfrom
Conversation
|
This is an automatic comment. The PR descriptions does not match the template. Please, edit it accordingly. The error is: More than one changelog category specified: 'Build/Testing/Packaging Improvement', 'Bug Fix (user-visible misbehavior in an official stable release)' |
|
@tavplubix Please be a reviewer of this pull request and assign the label 'Can be tested' |
|
This is an automated comment for commit 7dbc0d3 with description of existing statuses. It's updated for the latest CI running
|
|
Fast test failed with strange error: Why Running 3 stateless tests (MainProcess). |
|
It's because we disable some features in Fast test to make build faster: and clickhouse was built without mysql support. It can be fixed with |
|
My tests do not pass on CI. Also, I saw such an error: It looks like the newly created user does not have the access rights to select from system.numbers. |
|
Restarting tests again and again does not make sense. I will check the failures and merge if they are unrelated. |
|
Stress tests - check_status.tsv doesn't exists - #53064 (comment) |
|
I don't know why those tests are so slow in the debug build. Release results: I got similar results on my machine as in the release version. I ran those tests hundreds of times, and the tests always passed. ASAN and TSAN tests are also quite slow, but not so much. These tests rely on timeouts and expect some sufficient performance. It seems I have 2 ways:
200 seconds is already too long tests for 5 threaded test, so I'm going to prohibit running tests in debug mode. ( |
|
Created PR with fixed tests: #53255 Please give some recommendations if you have such (special builds? compilation keys?) How should I run auto tests before creation PR to avoid such failures in the future? |
It's hard to avoid that completely. We have P.S. I'm sorry that it was reverted because of just one test failure. Usually, we only revert PRs that actually break something. |
|
Thanks! I did not know that. I just launched my |
Added several new tests for session_log and fixed the inconsistency of the session_log records between user login and logout.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fixed the record inconsistency in session_log between login and logout.
Inconsistency comes from this behavior:
During a TCP session, the client authenticates as
Alice, with interface 'TCP' (set inTCPHandler::makeSession()) on the server side, and then server calls makeSessionContext() with this client_info.After session setup, the client sends
Protocol::Client::Querypacket, the TCP handler accepts it, and then reads client_info.client_tcp_protocol_version >= DBMS_MIN_REVISION_WITH_CLIENT_INFO is true for our caseThis
client_infois used forSession::createQueryContextand it can differ from session->getClientInfo().Session::createQueryContext uses client info from
query_contextfor the Login Success session log record.Session::~Session uses client info from
Session::getClientInfo()This can lead to these results in the session log:
This pull request forces using
Session::getClientInfo()for login success and logoutsession_logrecords.I think we should verify
client_infofrom the client inTCPHandler. It should validate 'interface' at least, it should not be HTTP, GRPC, or other, host, client_name, and protocol versions also must match between session->getClientInfo() and received client_info.