Support send_profile_events settings to reduce network flow#89588
Conversation
Signed-off-by: Kaviraj <[email protected]>
Signed-off-by: Kaviraj <[email protected]>
|
Workflow [PR], commit [fc60f8d] Summary: ❌
|
send_profile_events settings to reduce network flow
send_profile_events settings to reduce network flowsend_profile_events settings to reduce network flow
Signed-off-by: Kaviraj <[email protected]>
|
@kavirajk at least in some invocations, this particular profile event was not sent in the default mode. |
Signed-off-by: Kaviraj <[email protected]>
|
Still a problem. Maybe use another profile event, e.g., |
Signed-off-by: Kaviraj <[email protected]>
|
Still the flaky check is failing for this test even with Is there any way I can reproduce this failure in local? Tried this from the failure log |
I was able to reproduce locally with |
Co-authored-by: Azat Khuzhin <[email protected]>
|
To clarify the behavior: Flaky check uses the Thread Fuzzer, which randomly slows down threads to increase the probability of race conditions. |
|
Thanks @azat @alexey-milovidov for the help and explanation about Thread Fuzzer 👍 @alexey-milovidov what do you think about this comment from @azat His concern about "the settings to change the protocol (no |
We don't change the structure of the protocol, so it's not a big problem. However, there are other concerns. |
|
I've tested clickhouse_driver and it can be broken with |
Thanks for testing @azat. I think setting to Edit: Also thinking bit more about it. Isn't this the same problem for any new settings we add to ClickHouse? (say older clients -> talking to newer ClickHouse server). And still client can pass these newer settings in query that may have different behavior from the server side. |
|
@azat thinking bit more about our discussion today. If we design this change so that server and client negotiate client revision during The problem is then server has to maintain all these client revisions to make that decision? I can imagine it can easily get out of hands considering there can be Looks to me more complex. May be I miss something? |
|
@alexey-milovidov what do you think about the above discussions? Curious to know your thoughts. (btw. The failing tests on this PR seems unrelated, looks CH server got killed for some reason) |
|
The change is reasonable. Having this option makes sense even if it can be misused. Let's merge. |
|
@kavirajk, sorry, I just noticed that the change in SettingsChangesHistory was incorrect. Please resubmit. |
|
Is there a place I can track the re-submission? Is it about changing this line https://github.com/ClickHouse/ClickHouse/pull/89588/files#diff-f14e258a31a2fffb2137cf9aec96924ebd422ccd6f588bcfca181687ff8732faR44 to |
|
@erezrokah, merged. |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Added
send_profile_eventssetting which allows clients to reduce network traffic when profile events are unused.Documentation entry for user-facing changes
Details
Built on top of #80761 preserving original author's (@SpencerTorres) commits.
(NOTE: I was unable edit the original PR because I don't have permission on author's fork and not a maintainer to edit the PR as is. Hence the new PR)
For users who are doing many small async inserts over Native, it's possible that more data will be received from the server than sent by the client. The ProfileEvents packet was identified to be a large portion of this. To help reduce traffic, I have added a boolean setting called
send_profile_eventsthat defaults to 1. Clients can choose to disable profile events to reduce traffic. In the Go client for example, this data isn't used. It's parsed and immediately ignored. This can be applied per-query.With profile events enabled
With profile events disabled