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

refactor: extract boolean env var parse #1553

Merged
merged 5 commits into from
Apr 2, 2022

Conversation

BugenZhao
Copy link
Member

@BugenZhao BugenZhao commented Apr 2, 2022

Signed-off-by: Bugen Zhao [email protected]

What's changed and what's your intention?

As title.

Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests

Refer to a related PR or issue link (optional)

@BugenZhao BugenZhao requested review from skyzh and neverchanje April 2, 2022 04:13
@BugenZhao BugenZhao enabled auto-merge (squash) April 2, 2022 04:13
@codecov
Copy link

codecov bot commented Apr 2, 2022

Codecov Report

Merging #1553 (08124f6) into main (e3cf742) will increase coverage by 0.00%.
The diff coverage is 77.77%.

@@            Coverage Diff            @@
##               main    #1553   +/-   ##
=========================================
  Coverage     69.61%   69.62%           
  Complexity     2766     2766           
=========================================
  Files          1038     1039    +1     
  Lines         90816    90822    +6     
  Branches       1790     1790           
=========================================
+ Hits          63226    63233    +7     
+ Misses        26699    26698    -1     
  Partials        891      891           
Flag Coverage Δ
java 61.01% <ø> (ø)
rust 71.44% <77.77%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
rust/common/src/util/mod.rs 0.00% <ø> (ø)
rust/frontend/src/handler/query.rs 0.00% <ø> (ø)
rust/frontend/src/handler/query_single.rs 0.00% <ø> (ø)
rust/common/src/util/env_var.rs 75.00% <75.00%> (ø)
rust/stream/src/task/stream_manager.rs 52.14% <100.00%> (ø)
rust/meta/src/hummock/compaction.rs 77.65% <0.00%> (-0.28%) ⬇️
rust/common/src/types/ordered_float.rs 23.70% <0.00%> (+0.19%) ⬆️
rust/connector/src/filesystem/file_common.rs 81.16% <0.00%> (+0.44%) ⬆️

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

Copy link
Contributor

@skyzh skyzh left a comment

Choose a reason for hiding this comment

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

LGTM 🤣

Signed-off-by: Bugen Zhao <[email protected]>
Comment on lines -34 to +35
static ref IMPLICIT_FLUSH: bool =
std::env::var("RW_IMPLICIT_FLUSH").unwrap_or_else(|_| { "1".to_string() }) == "1";
pub(super) static ref IMPLICIT_FLUSH: bool = env_var_is_true("RW_IMPLICIT_FLUSH");
Copy link
Member

@xxchan xxchan Apr 2, 2022

Choose a reason for hiding this comment

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

The old default value is true, but now is false?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep. It should be false. 🤪

@BugenZhao BugenZhao merged commit f38f74a into main Apr 2, 2022
@BugenZhao BugenZhao deleted the bz/extract-boolean-env-var-parse branch April 2, 2022 06:09
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.

4 participants