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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: enable async stack trace by default #6539

Merged
merged 5 commits into from Nov 23, 2022
Merged

Conversation

BugenZhao
Copy link
Member

@BugenZhao BugenZhao commented Nov 23, 2022

I hereby agree to the terms of the Singularity Data, Inc. Contributor License Agreement.

What's changed and what's your intention?

Previously the async stack trace is only enabled by default only if the user launches with risedev. This PR also enables it by default if no arg is specified, which is for production (cloud) deployment.

I've benched the release build with async stack trace = (verbose, on, off) and hardly found any performance regression. So I guess we're okay to enable it in production.

I'd also like to cherry pick this fix to the release branch. 馃

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • All checks passed in ./risedev check (or alias, ./risedev c)

Refer to a related PR or issue link (optional)

Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
@github-actions github-actions bot added the type/fix Bug fix label Nov 23, 2022
@codecov
Copy link

codecov bot commented Nov 23, 2022

Codecov Report

Merging #6539 (90d6128) into main (213da6a) will increase coverage by 0.04%.
The diff coverage is 65.37%.

@@            Coverage Diff             @@
##             main    #6539      +/-   ##
==========================================
+ Coverage   74.01%   74.06%   +0.04%     
==========================================
  Files         983      989       +6     
  Lines      160712   161778    +1066     
==========================================
+ Hits       118952   119820     +868     
- Misses      41760    41958     +198     
Flag Coverage 螖
rust 74.06% <65.37%> (+0.04%) 猬嗭笍

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage 螖
src/batch/src/executor/join/local_lookup_join.rs 56.28% <0.00%> (酶)
src/batch/src/executor/mod.rs 72.30% <酶> (酶)
src/batch/src/executor/source.rs 0.00% <0.00%> (酶)
.../batch/src/task/consistent_hash_shuffle_channel.rs 0.00% <0.00%> (酶)
src/common/src/types/mod.rs 70.70% <酶> (酶)
src/common/src/util/mod.rs 0.00% <酶> (酶)
src/common/src/util/prost.rs 0.00% <0.00%> (酶)
src/common/src/util/scan_range.rs 76.81% <酶> (酶)
src/common/src/util/worker_util.rs 0.00% <酶> (酶)
src/compute/src/lib.rs 2.56% <酶> (酶)
... and 138 more

馃摚 We鈥檙e building smart automated test selection to slash your CI/CD build times. Learn more

Signed-off-by: Bugen Zhao <i@bugenzhao.com>
@BugenZhao BugenZhao marked this pull request as ready for review November 23, 2022 06:59
@BugenZhao BugenZhao requested a review from skyzh November 23, 2022 07:00
Comment on lines -246 to -247
/// With `debug_assertions` on, this span will be disabled statically to avoid affecting
/// performance too much. Therefore, `verbose` mode in [`TraceConfig`] is ignored.
Copy link
Member Author

Choose a reason for hiding this comment

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

Previously I thought the bad performance with verbose span, non-verbose configuration, and debug profile was caused by the extra code of matching the thread-local context. But actually, I just forgot to pass the config to the trace root and always use verbose: true configuration, as above. 馃ぃ

Copy link
Contributor

@fuyufjh fuyufjh left a comment

Choose a reason for hiding this comment

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

LGTM! 馃帀

@BugenZhao BugenZhao added the mergify/can-merge Indicates that the PR can be added to the merge queue label Nov 23, 2022
@mergify mergify bot merged commit 023cee2 into main Nov 23, 2022
@mergify mergify bot deleted the bz/fix-async-stack-trace-config branch November 23, 2022 09:26
lmatz pushed a commit that referenced this pull request Nov 28, 2022
* fix config

Signed-off-by: Bugen Zhao <i@bugenzhao.com>

* turn on trace by default

Signed-off-by: Bugen Zhao <i@bugenzhao.com>

* try use default verbose in CI

Signed-off-by: Bugen Zhao <i@bugenzhao.com>

* cleanup comments

Signed-off-by: Bugen Zhao <i@bugenzhao.com>

Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
lmatz added a commit that referenced this pull request Nov 28, 2022
fix: enable async stack trace by default (#6539)

* fix config

Signed-off-by: Bugen Zhao <i@bugenzhao.com>

* turn on trace by default

Signed-off-by: Bugen Zhao <i@bugenzhao.com>

* try use default verbose in CI

Signed-off-by: Bugen Zhao <i@bugenzhao.com>

* cleanup comments

Signed-off-by: Bugen Zhao <i@bugenzhao.com>

Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Co-authored-by: Bugen Zhao <i@bugenzhao.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mergify/can-merge Indicates that the PR can be added to the merge queue type/fix Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants