Skip to content

chore: task local context for debugging#3969

Merged
mergify[bot] merged 6 commits into
mainfrom
bz/debug-context
Jul 18, 2022
Merged

chore: task local context for debugging#3969
mergify[bot] merged 6 commits into
mainfrom
bz/debug-context

Conversation

@BugenZhao

Copy link
Copy Markdown
Contributor

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

What's changed and what's your intention?

As title. We previously used this for debugging #2580. Check the test below for usages.

https://github.com/singularity-data/risingwave/blob/e937aa66b405ad262b3849369af96ec24c2d1ae5/src/common/src/util/debug_context.rs#L42-L56

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>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

license-eye has totally checked 939 files.

Valid Invalid Ignored Fixed
937 1 1 0
Click to see the invalid file list
  • src/common/src/util/debug_context.rs

Comment thread src/common/src/util/debug_context.rs
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@codecov

codecov Bot commented Jul 18, 2022

Copy link
Copy Markdown

Codecov Report

Merging #3969 (edd0ac7) into main (69bb38d) will decrease coverage by 0.00%.
The diff coverage is 87.71%.

@@            Coverage Diff             @@
##             main    #3969      +/-   ##
==========================================
- Coverage   73.88%   73.87%   -0.01%     
==========================================
  Files         825      826       +1     
  Lines      116782   116827      +45     
==========================================
+ Hits        86286    86308      +22     
- Misses      30496    30519      +23     
Flag Coverage Δ
rust 73.87% <87.71%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
src/common/src/util/mod.rs 0.00% <ø> (ø)
src/stream/src/executor/debug/trace.rs 0.00% <0.00%> (ø)
src/batch/src/task/task_execution.rs 53.63% <94.11%> (+1.52%) ⬆️
src/common/src/util/debug_context.rs 96.77% <96.77%> (ø)
src/storage/src/hummock/compaction_executor.rs 97.43% <100.00%> (+0.13%) ⬆️
src/stream/src/executor/chain.rs 89.88% <100.00%> (ø)
src/expr/src/vector_op/cast.rs 70.06% <0.00%> (-6.13%) ⬇️
src/frontend/src/expr/mod.rs 82.26% <0.00%> (-2.15%) ⬇️
src/meta/src/manager/id.rs 94.94% <0.00%> (-0.57%) ⬇️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@skyzh skyzh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. How to extract the context out of the task local variable?

@st1page st1page left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@mergify mergify Bot merged commit ae9805c into main Jul 18, 2022
@mergify mergify Bot deleted the bz/debug-context branch July 18, 2022 09:53
@BugenZhao

Copy link
Copy Markdown
Contributor Author

LGTM. How to extract the context out of the task local variable?

Like this.

             with_debug_context(|d| { 
                 println!("{:?}", d); 
                 assert!(d.as_stream_executor().is_some()) 
             }); 

nasnoisaac pushed a commit to nasnoisaac/risingwave that referenced this pull request Aug 9, 2022
* chore: task local context for debugging

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

* refine

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

* Update src/common/src/util/debug_context.rs

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* add context for batch executor creation

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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants