Skip to content

Fix timeout for hedged requests - #51582

Merged
Avogar merged 2 commits into
ClickHouse:masterfrom
azat:hedged-requests-timeouts
Jul 21, 2023
Merged

Avogar merged 2 commits into
ClickHouse:masterfrom
azat:hedged-requests-timeouts

Conversation

@azat

@azat azat commented Jun 29, 2023

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

Fix timeout (send_timeout/receive_timeout) for hedged requests

Documentation entry for user-facing changes

Reset the timeout for hedged requests after each packet (such as Progress packets) to avoid triggering send_timeout/receive_timeout as a total timeout for the query in some cases.

Here is a simple query that demonstrates the problem:

select * from remote('127.2', view(select sleep(3) from system.one)) settings receive_timeout=1

Cc: @Avogar

@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-bugfix Pull request with bugfix, not backported by default label Jun 29, 2023
@robot-ch-test-poll1

robot-ch-test-poll1 commented Jun 29, 2023 •

Copy link
Copy Markdown
Contributor

This is an automated comment for commit 921d25e with description of existing statuses. It's updated for the latest CI running
The full report is available here
The overall status of the commit is 🟡 pending

Check nameDescriptionStatus
CI runningA meta-check that indicates the running CI. Normally, it's in success or pending state. The failed status indicates some problems with the PR🟡 pending
Mergeable CheckChecks if all other necessary checks are successful🟢 success

@Avogar Avogar self-assigned this Jun 29, 2023
@azat

azat commented Jul 7, 2023

Copy link
Copy Markdown
Member Author

Lots of iptables failures

E           subprocess.CalledProcessError: Command '['iptables', '--wait', '-I', 'DOCKER-USER', '1', '-p', 'tcp', '-s', '172.16.2.3', '-d', '172.16.2.2', '-j', 'DROP']' returned non-zero exit status 1.
...
output = 'iptables: No chain/target/match by that name.\n', exit_code = 1

@azat
azat force-pushed the hedged-requests-timeouts branch from c78974f to bccef91 Compare July 7, 2023 18:41
@azat

azat commented Jul 8, 2023

Copy link
Copy Markdown
Member Author

Integration tests (release) [2/4] — fail: 16, passed: 560, flaky: 2

Upgrade check (debug) — Logical error thrown (see clickhouse-server.log or logical_errors.txt)

/var/log/clickhouse-server/clickhouse-server.err.log:2023.07.08 08:35:09.264437 [ 3429 ] {c4afdc21-eb6d-4ba1-ad79-750aca3b6235} <Error> executeQuery: Code: 49. DB::Exception: Broken buckets. its size(3) is not power of 2: While executing FillingRightJoinSide. (LOGICAL_ERROR) (version 23.6.1.1524 (of

Should be already fixed by #50699

@azat
azat requested a review from Avogar July 12, 2023 12:19

@Avogar Avogar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cannot merge until we fix tests to pass mergable check (maybe they are fixed and we need to update branch)

@azat
azat force-pushed the hedged-requests-timeouts branch from bccef91 to c84edca Compare July 12, 2023 13:19
@azat

azat commented Jul 13, 2023 •

Copy link
Copy Markdown
Member Author

The error had been already fixed, but requires another PR to be merged:

Stress test (ubsan) — Killed by signal (in clickhouse-server.log)

Reset the timeout for hedged requests after each packet (such as
Progress packets) to avoid triggering send_timeout/receive_timeout as a
total timeout for the query in some cases.

Here is a simple query that demonstrates the problem:

    select * from remote('127.2', view(select sleep(3) from system.one)) settings receive_timeout=1

Signed-off-by: Azat Khuzhin <[email protected]>
@azat
azat force-pushed the hedged-requests-timeouts branch from c84edca to 4669951 Compare July 16, 2023 05:48
@Avogar

Avogar commented Jul 17, 2023 •

Copy link
Copy Markdown
Member

Stress test (tsan) — Sanitizer assert (in stderr.log)

Data race in Connection::setAsyncCallback, interesting. I will investigate

UPD: found the problem, will create a PR with fix

UPD2: #52219

@azat
azat requested a review from Avogar July 21, 2023 11:22
@Avogar
Avogar merged commit f749b52 into ClickHouse:master Jul 21, 2023
@azat
azat deleted the hedged-requests-timeouts branch July 21, 2023 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants