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

feat(config): support for setting default visibility_mode via config #10186

Merged
merged 2 commits into from
Jun 6, 2023

Conversation

zwang28
Copy link
Contributor

@zwang28 zwang28 commented Jun 6, 2023

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

Previously the default value of visibility_mode session var is hard coded. It's inconvenient for a user who wants a different visibility_mode, because it need be set per session. And usually user always use the same visibility_mode for the same cluster.

This PR adds support for setting default visibility_mode for all sessions from a frontend node via its config.

  • For a new session, visibility_mode session var is Default, which is interpreted as reading from config.
  • If visibility_mode session var is set (All or Checkpoint), it overrides config one.

#8940

Checklist For Contributors

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have demonstrated that backward compatibility is not broken by breaking changes and created issues to track deprecated features to be removed in the future. (Please refer to the issue)
  • All checks passed in ./risedev check (or alias, ./risedev c)

Checklist For Reviewers

  • I have requested macro/micro-benchmarks as this PR can affect performance substantially, and the results are shown.

Documentation

  • My PR DOES NOT contain user-facing changes.
Click here for Documentation

Types of user-facing changes

Please keep the types that apply to your changes, and remove the others.

  • Installation and deployment
  • Connector (sources & sinks)
  • SQL commands, functions, and operators
  • RisingWave cluster configuration changes
  • Other (please specify in the release note below)

Release note

@zwang28 zwang28 requested review from hzxa21 and xxhZs June 6, 2023 07:25
@codecov
Copy link

codecov bot commented Jun 6, 2023

Codecov Report

Merging #10186 (85b6822) into main (0cd063f) will decrease coverage by 0.01%.
The diff coverage is 74.35%.

@@            Coverage Diff             @@
##             main   #10186      +/-   ##
==========================================
- Coverage   70.82%   70.82%   -0.01%     
==========================================
  Files        1234     1234              
  Lines      211336   211355      +19     
==========================================
+ Hits       149675   149682       +7     
- Misses      61661    61673      +12     
Flag Coverage Δ
rust 70.82% <74.35%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
src/frontend/src/handler/query.rs 27.24% <0.00%> (ø)
src/frontend/src/lib.rs 19.04% <ø> (ø)
...frontend/src/scheduler/hummock_snapshot_manager.rs 65.80% <66.66%> (ø)
src/frontend/src/session.rs 27.62% <66.66%> (+0.31%) ⬆️
src/frontend/src/scheduler/worker_node_manager.rs 68.83% <71.42%> (-0.05%) ⬇️
src/common/src/session_config/visibility_mode.rs 80.00% <85.71%> (+0.83%) ⬆️
src/common/src/config.rs 82.28% <100.00%> (+0.16%) ⬆️
src/common/src/session_config/mod.rs 33.49% <100.00%> (ø)
src/frontend/src/handler/explain.rs 69.23% <100.00%> (ø)
src/meta/src/manager/cluster.rs 73.21% <100.00%> (-0.19%) ⬇️

... and 5 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

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.

2 participants