Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improvement] (pipeline) Cancel related query if backend restarts or dead #23863

Merged
merged 4 commits into from
Sep 8, 2023

Conversation

zhiqiang-hhhh
Copy link
Contributor

@zhiqiang-hhhh zhiqiang-hhhh commented Sep 4, 2023

Proposed changes

This is the 2nd pr of #23704 , now we can cancel query if related backend restarts or dead. Privious pr is #23582

@zhiqiang-hhhh
Copy link
Contributor Author

run buildall

@zhiqiang-hhhh zhiqiang-hhhh changed the title [improment] (pipeline) Cancel related query if backend restarts or dead. [improvement] (pipeline) Cancel related query if backend restarts or dead Sep 4, 2023
@zhiqiang-hhhh zhiqiang-hhhh changed the title [improvement] (pipeline) Cancel related query if backend restarts or dead [Improvement] (pipeline) Cancel related query if backend restarts or dead Sep 4, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2023

clang-tidy review says "All clean, LGTM! 👍"

@zhiqiang-hhhh
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2023

clang-tidy review says "All clean, LGTM! 👍"

@hello-stephen
Copy link
Contributor

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 45.55 seconds
stream load tsv: 544 seconds loaded 74807831229 Bytes, about 131 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 64 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 30 seconds loaded 861443392 Bytes, about 27 MB/s
insert into select: 29.1 seconds inserted 10000000 Rows, about 343K ops/s
storage size: 17162062480 Bytes

@zhiqiang-hhhh
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2023

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 48.32 seconds
stream load tsv: 546 seconds loaded 74807831229 Bytes, about 130 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 64 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select: 28.8 seconds inserted 10000000 Rows, about 347K ops/s
storage size: 17162061647 Bytes

@zhiqiang-hhhh
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 48.82 seconds
stream load tsv: 548 seconds loaded 74807831229 Bytes, about 130 MB/s
stream load json: 21 seconds loaded 2358488459 Bytes, about 107 MB/s
stream load orc: 64 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 30 seconds loaded 861443392 Bytes, about 27 MB/s
insert into select: 28.6 seconds inserted 10000000 Rows, about 349K ops/s
storage size: 17162020467 Bytes

@zhiqiang-hhhh zhiqiang-hhhh force-pushed the cancel-be-pr branch 2 times, most recently from ea1b7f3 to ea3f858 Compare September 5, 2023 02:29
@zhiqiang-hhhh
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

github-actions bot commented Sep 5, 2023

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Sep 5, 2023

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 46.93 seconds
stream load tsv: 537 seconds loaded 74807831229 Bytes, about 132 MB/s
stream load json: 22 seconds loaded 2358488459 Bytes, about 102 MB/s
stream load orc: 64 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select: 29.3 seconds inserted 10000000 Rows, about 341K ops/s
storage size: 17161936732 Bytes

@zhiqiang-hhhh
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

github-actions bot commented Sep 5, 2023

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 48.45 seconds
stream load tsv: 531 seconds loaded 74807831229 Bytes, about 134 MB/s
stream load json: 21 seconds loaded 2358488459 Bytes, about 107 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select: 29.0 seconds inserted 10000000 Rows, about 344K ops/s
storage size: 17162061315 Bytes

@github-actions
Copy link
Contributor

github-actions bot commented Sep 5, 2023

clang-tidy review says "All clean, LGTM! 👍"

@zhiqiang-hhhh
Copy link
Contributor Author

run FE UT

@zhiqiang-hhhh
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 47.68 seconds
stream load tsv: 536 seconds loaded 74807831229 Bytes, about 133 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 64 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 28.8 seconds inserted 10000000 Rows, about 347K ops/s
storage size: 17162120996 Bytes

@yiguolei yiguolei added the kind/meta-version-change Categorizes issue or PR as related to changing meta version label Sep 6, 2023
for (Backend be : currentBackends) {
curBeMap.put(be.getId(), be);
}
lock();
Copy link
Contributor

Choose a reason for hiding this comment

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

use try (lock()) like RAII in cpp

Copy link
Contributor Author

Choose a reason for hiding this comment

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

but here we do not have potential thrown exception? can we use try {lock()} finally {unlock();} either?

}
lock();

for (Long id : idToBackend.keySet()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

这里为什么要判断这个idToBackend, 按道理说直接BackendExecStates 就行了吧?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

嗯,这里可以删掉,只用 BackendExecStates 跟 PipelineExecContext 也是可以的

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这里为什么要判断这个idToBackend, 按道理说直接BackendExecStates 就行了吧?

idToBackend 是用来记录 某个 coordinator 在 prepare阶段时候 所有 be 信息的 snapshot。感觉我们这里索引数据结构太多了,很容易用乱,需要一个 multi_index container 这种数据结构

@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2023

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2023

clang-tidy review says "All clean, LGTM! 👍"

@zhiqiang-hhhh
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 49.61 seconds
stream load tsv: 538 seconds loaded 74807831229 Bytes, about 132 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 64 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select: 29.4 seconds inserted 10000000 Rows, about 340K ops/s
storage size: 17162267662 Bytes

@zhiqiang-hhhh
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

github-actions bot commented Sep 7, 2023

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 45.83 seconds
stream load tsv: 540 seconds loaded 74807831229 Bytes, about 132 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 64 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select: 28.8 seconds inserted 10000000 Rows, about 347K ops/s
storage size: 17162167310 Bytes

@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2023

clang-tidy review says "All clean, LGTM! 👍"

@zhiqiang-hhhh
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2023

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 46.3 seconds
stream load tsv: 533 seconds loaded 74807831229 Bytes, about 133 MB/s
stream load json: 21 seconds loaded 2358488459 Bytes, about 107 MB/s
stream load orc: 64 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select: 29.1 seconds inserted 10000000 Rows, about 343K ops/s
storage size: 17162197187 Bytes

Copy link
Contributor

@yiguolei yiguolei left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2023

PR approved by at least one committer and no changes requested.

@github-actions github-actions bot added approved Indicates a PR has been approved by one committer. reviewed labels Sep 8, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2023

PR approved by anyone and no changes requested.

Copy link
Contributor

@xinyiZzz xinyiZzz left a comment

Choose a reason for hiding this comment

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

LGTM

@yiguolei yiguolei merged commit 5c2f9eb into apache:master Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. kind/meta-version-change Categorizes issue or PR as related to changing meta version reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants