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(risedev): support 3 compute nodes in playground #4332

Merged
merged 6 commits into from
Aug 1, 2022
Merged

Conversation

BugenZhao
Copy link
Member

@BugenZhao BugenZhao commented Aug 1, 2022

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

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

What's changed and what's your intention?

As title. Used lazy_static for shared in-memory object store.

To start this:

PLAYGROUND_PROFILE=playground-3cn ./risedev p

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)

Close #4195.

@BugenZhao BugenZhao requested review from skyzh and wenym1 August 1, 2022 09:08
@skyzh
Copy link
Contributor

skyzh commented Aug 1, 2022

Need to add compactor?

@BugenZhao
Copy link
Member Author

Need to add compactor?

Both LGTM.

Signed-off-by: Bugen Zhao <[email protected]>
}
}

/// Create a shared reference to the in-memory object store in this process. Used for multiple
/// compute-nodes or compactors in the same process by `risedev playground`.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should add a feature in the crate to enable this.

Copy link
Member Author

Choose a reason for hiding this comment

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

This function should not be used by default, so SHARED should not be initialized and there's no side effect. Adding a feature for this may make playground deployment complicated. 🥵

Copy link
Member Author

@BugenZhao BugenZhao Aug 1, 2022

Choose a reason for hiding this comment

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

Added explicit notes for this and make it private outside the super module.

@codecov
Copy link

codecov bot commented Aug 1, 2022

Codecov Report

Merging #4332 (dc85d22) into main (650221e) will decrease coverage by 0.01%.
The diff coverage is 2.56%.

@@            Coverage Diff             @@
##             main    #4332      +/-   ##
==========================================
- Coverage   74.32%   74.31%   -0.02%     
==========================================
  Files         844      844              
  Lines      122474   122496      +22     
==========================================
  Hits        91027    91027              
- Misses      31447    31469      +22     
Flag Coverage Δ
rust 74.31% <2.56%> (-0.02%) ⬇️

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

Impacted Files Coverage Δ
src/cmd_all/src/bin/risingwave.rs 2.63% <0.00%> (ø)
src/object_store/src/object/mod.rs 37.36% <0.00%> (-0.60%) ⬇️
src/risedevtool/src/risectl_env.rs 0.00% <0.00%> (ø)
src/risedevtool/src/task/compactor_service.rs 0.00% <0.00%> (ø)
src/risedevtool/src/task/compute_node_service.rs 0.00% <0.00%> (ø)
src/risedevtool/src/task/utils.rs 0.00% <0.00%> (ø)
src/object_store/src/object/mem.rs 84.90% <12.50%> (-3.33%) ⬇️

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

Signed-off-by: Bugen Zhao <[email protected]>
@mergify mergify bot merged commit e630915 into main Aug 1, 2022
@mergify mergify bot deleted the bz/3cn-playground branch August 1, 2022 10:14
@skyzh
Copy link
Contributor

skyzh commented Aug 1, 2022

Also I’m wondering how many compactors are started indeed. For in-memory mode, every compute node will start a compactor. So maybe we have started 4?

@BugenZhao
Copy link
Member Author

Also I’m wondering how many compactors are started indeed. For in-memory mode, every compute node will start a compactor. So maybe we have started 4?

Oops, seems to be a problem. What's the optimal solution? How about disabling compactor in compute node under shared in-memory mode?

@skyzh
Copy link
Contributor

skyzh commented Aug 1, 2022

Oops, seems to be a problem. What's the optimal solution? How about disabling compactor in compute node under shared in-memory mode?

Can we make compactor to start with object store instance in in-memory mode?

@BugenZhao
Copy link
Member Author

BugenZhao commented Aug 1, 2022

Can we make compactor to start with object store instance in in-memory mode?

Currently it does, so we've started 4. 🤣 Let's do not start compactor in shared in-memory mode, behaving like minio/s3?

https://github.com/singularity-data/risingwave/blob/61c0104e7755e28f9f13a2d122d50982e326c89e/src/compute/src/server.rs#L145-L151

@skyzh
Copy link
Contributor

skyzh commented Aug 1, 2022

Let's do not start compactor in shared in-memory mode, behaving like minio/s3?

Looks good. So we'll need a flag to tell each node whether to enable compactor or not.

Note that we also have another edge case. When risedev.yml is not present, playground mode should start a compactor thread along with compute node.

https://github.com/singularity-data/risingwave/blob/7d1c0b6d6f91873fd00a6f92e6b8d7ad37d3e632/src/cmd_all/src/playground.rs#L108-L113

nasnoisaac pushed a commit to nasnoisaac/risingwave that referenced this pull request Aug 9, 2022
…4332)

* feat(risedev): support 3 compute nodes in playground

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

* Update src/risedevtool/src/task/utils.rs

* add compactor

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

* add notes

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

* make it private outside the super module

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

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.

playground: support multiple compute node and shared in-memory object store
3 participants